pub struct WindowCommandActionAvailabilityService { /* private fields */ }Expand description
Window-scoped per-command “action availability” snapshots published by the UI layer.
This is a data-only integration seam used by cross-surface command gating (menus, command
palette, shortcut help) without depending on fret-ui internals.
Semantics:
None: no availability information is published for this window/command (treat as unknown).Some(true): command is available along the current dispatch path.Some(false): command is unavailable (blocked or not reachable) along the current dispatch path.
Implementations§
Source§impl WindowCommandActionAvailabilityService
impl WindowCommandActionAvailabilityService
pub fn snapshot(&self, window: AppWindowId) -> Option<&HashMap<CommandId, bool>>
pub fn snapshot_arc( &self, window: AppWindowId, ) -> Option<Arc<HashMap<CommandId, bool>>>
pub fn available( &self, window: AppWindowId, command: &CommandId, ) -> Option<bool>
pub fn set_snapshot( &mut self, window: AppWindowId, availability: HashMap<CommandId, bool>, )
pub fn remove_window(&mut self, window: AppWindowId)
Trait Implementations§
Source§impl Default for WindowCommandActionAvailabilityService
impl Default for WindowCommandActionAvailabilityService
Source§fn default() -> WindowCommandActionAvailabilityService
fn default() -> WindowCommandActionAvailabilityService
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WindowCommandActionAvailabilityService
impl RefUnwindSafe for WindowCommandActionAvailabilityService
impl Send for WindowCommandActionAvailabilityService
impl Sync for WindowCommandActionAvailabilityService
impl Unpin for WindowCommandActionAvailabilityService
impl UnsafeUnpin for WindowCommandActionAvailabilityService
impl UnwindSafe for WindowCommandActionAvailabilityService
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