pub struct CommandRegistry { /* private fields */ }Expand description
Ordered registry of declared command names.
Implementations§
Source§impl CommandRegistry
impl CommandRegistry
Sourcepub fn register(&mut self, name: CommandName) -> RuntimeResult<()>
pub fn register(&mut self, name: CommandName) -> RuntimeResult<()>
Registers a command name, rejecting duplicates.
Sourcepub fn contains(&self, name: &CommandName) -> bool
pub fn contains(&self, name: &CommandName) -> bool
Reports whether a command name is registered.
Sourcepub fn list(&self) -> &[CommandName]
pub fn list(&self) -> &[CommandName]
Returns command names in registration order.
Trait Implementations§
Source§impl Debug for CommandRegistry
impl Debug for CommandRegistry
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