pub struct CommandRegistry { /* private fields */ }Expand description
Registry of known commands and their metadata.
Apps typically populate this during startup and use it to drive keybinding resolution, command palettes, and menu surfaces.
Implementations§
Source§impl CommandRegistry
impl CommandRegistry
pub fn register(&mut self, id: CommandId, meta: CommandMeta)
pub fn get(&self, id: CommandId) -> Option<&CommandMeta>
pub fn iter(&self) -> impl Iterator<Item = (&CommandId, &CommandMeta)>
Trait Implementations§
Source§impl Default for CommandRegistry
impl Default for CommandRegistry
Source§fn default() -> CommandRegistry
fn default() -> CommandRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandRegistry
impl RefUnwindSafe for CommandRegistry
impl Send for CommandRegistry
impl Sync for CommandRegistry
impl Unpin for CommandRegistry
impl UnsafeUnpin for CommandRegistry
impl UnwindSafe for CommandRegistry
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