[][src]Struct cliargs_t::Commander

pub struct Commander<'a> {
    pub known_commands: HashMap<String, &'a Box<dyn Command>>,
}

Fields

known_commands: HashMap<String, &'a Box<dyn Command>>

A map of <command_name, command>. Command names should be lowercase.

Implementations

impl<'a> Commander<'a>[src]

pub fn new(commands: &'a mut Vec<Box<dyn Command>>) -> Commander<'a>[src]

pub fn handle_input(&self, input: String)[src]

Takes in a user's command input and parses and executes the command if everything is in order.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Commander<'a>[src]

impl<'a> !Send for Commander<'a>[src]

impl<'a> !Sync for Commander<'a>[src]

impl<'a> Unpin for Commander<'a>[src]

impl<'a> !UnwindSafe for Commander<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.