pub struct CommandRegistry { /* private fields */ }Implementations§
Source§impl CommandRegistry
impl CommandRegistry
pub fn new() -> Self
pub fn register(&mut self, def: CommandDefinition)
pub fn get(&self, name: &str) -> Option<&CommandDefinition>
pub fn completions(&self, prefix: &str) -> Vec<String>
pub fn list_commands(&self) -> Vec<(&str, &str, CommandType)>
pub async fn dispatch(&self, input: &str) -> Option<AppResult<CommandOutput>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
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