pub struct WindowCommandEnabledService { /* private fields */ }Expand description
Window-scoped per-command enabled/disabled overrides published by the app layer.
This is a data-only integration seam used by cross-surface command gating (menus, command palette, shortcuts) without depending on UI-kit or app-specific model types.
Semantics:
None: no override; fall back towhenevaluation and other gating.Some(true): force enabled (still may be disabled by other gating).Some(false): force disabled.
Implementations§
Source§impl WindowCommandEnabledService
impl WindowCommandEnabledService
pub fn snapshot(&self, window: AppWindowId) -> Option<&HashMap<CommandId, bool>>
pub fn enabled(&self, window: AppWindowId, command: &CommandId) -> Option<bool>
pub fn set_snapshot( &mut self, window: AppWindowId, enabled: HashMap<CommandId, bool>, )
pub fn set_enabled( &mut self, window: AppWindowId, command: CommandId, enabled: bool, )
pub fn clear_command(&mut self, window: AppWindowId, command: &CommandId)
pub fn remove_window(&mut self, window: AppWindowId)
Trait Implementations§
Source§impl Debug for WindowCommandEnabledService
impl Debug for WindowCommandEnabledService
Source§impl Default for WindowCommandEnabledService
impl Default for WindowCommandEnabledService
Source§fn default() -> WindowCommandEnabledService
fn default() -> WindowCommandEnabledService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WindowCommandEnabledService
impl RefUnwindSafe for WindowCommandEnabledService
impl Send for WindowCommandEnabledService
impl Sync for WindowCommandEnabledService
impl Unpin for WindowCommandEnabledService
impl UnsafeUnpin for WindowCommandEnabledService
impl UnwindSafe for WindowCommandEnabledService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more