pub struct ModCli {
pub registry: CommandRegistry,
}
Expand description
Represents a CLI application
Fields§
§registry: CommandRegistry
Implementations§
Source§impl ModCli
impl ModCli
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 with_config(path: &str) -> Self
pub fn with_config(path: &str) -> Self
Preferred constructor: sets config path before CLI boot
pub fn run(&mut self, args: Vec<String>)
Auto Trait Implementations§
impl Freeze for ModCli
impl !RefUnwindSafe for ModCli
impl !Send for ModCli
impl !Sync for ModCli
impl Unpin for ModCli
impl !UnwindSafe for ModCli
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