ZIm/crates/settings/src
Marshall Bowers d633a0da78
gpui: Fix Global trait (#11187)
This PR restores the `Global` trait's status as a marker trait.

This was the original intent from #7095, when it was added, that had
been lost in #9777.

The purpose of the `Global` trait is to statically convey what types can
and can't be accessed as `Global` state, as well as provide a way of
restricting access to said globals.

For example, in the case of the `ThemeRegistry` we have a private
`GlobalThemeRegistry` that is marked as `Global`:
91b3c24ed3/crates/theme/src/registry.rs (L25-L34)

We're then able to permit reading the `ThemeRegistry` from the
`GlobalThemeRegistry` via a custom getter, while still restricting which
callers are able to mutate the global:
91b3c24ed3/crates/theme/src/registry.rs (L46-L61)

Release Notes:

- N/A
2024-04-29 16:37:37 -04:00
..
keymap_file.rs Remove 2 suffix for collab, rope, settings, menu 2024-01-03 12:29:16 -08:00
settings.rs New revision of the Assistant Panel (#10870) 2024-04-23 16:23:26 -07:00
settings_file.rs Remove if-not-else patterns (#10402) 2024-04-11 03:48:06 -04:00
settings_store.rs gpui: Fix Global trait (#11187) 2024-04-29 16:37:37 -04:00