pub struct CommandRegistry { /* private fields */ }
Implementations§
Source§impl CommandRegistry
impl CommandRegistry
Sourcepub fn set_prefix(&mut self, prefix: &str)
pub fn set_prefix(&mut self, prefix: &str)
Sets the command prefix
Sourcepub fn get_prefix(&self) -> &str
pub fn get_prefix(&self) -> &str
Gets the command prefix
Sourcepub fn all(&self) -> impl Iterator<Item = &Box<dyn Command>>
pub fn all(&self) -> impl Iterator<Item = &Box<dyn Command>>
Returns all registered commands (read-only)
pub fn execute(&self, cmd: &str, args: &[String])
pub fn load_internal_commands(&mut self)
pub fn load_from(&mut self, source: Box<dyn CommandSource>)
pub fn len(&self) -> usize
pub fn load_custom_commands(&mut self)
Auto Trait Implementations§
impl Freeze for CommandRegistry
impl !RefUnwindSafe for CommandRegistry
impl !Send for CommandRegistry
impl !Sync for CommandRegistry
impl Unpin 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