pub struct Dispatcher { /* private fields */ }Expand description
The dispatcher is responsible for choosing the appropriate subcommand to execute
Implementations§
Source§impl Dispatcher
impl Dispatcher
Sourcepub fn new() -> Dispatcher
pub fn new() -> Dispatcher
Creates a new dispatcher with no commands associated with it
pub fn run(&self, command: String) -> Result<i32, Box<dyn Error>>
Sourcepub fn get_help_message(&self) -> String
pub fn get_help_message(&self) -> String
Returns the help message as a string
Sourcepub fn print_help(&self)
pub fn print_help(&self)
Prints all the help messages for all the sub commands in this dispatcher
Auto Trait Implementations§
impl Freeze for Dispatcher
impl RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnwindSafe for Dispatcher
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