CommandMetadata

Trait CommandMetadata 

Source
pub trait CommandMetadata<Info> {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn long_description(&self) -> Option<&'static str>;
    fn call_with_argv(
        &self,
        info: Info,
        argv: Vec<String>,
    ) -> Result<Pin<Box<dyn Future<Output = Result<Value, Error>>>>, Error>;
    fn help(&self) -> Vec<&'static str>;

    // Provided method
    fn print_help(&self) { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn description(&self) -> &'static str

Source

fn long_description(&self) -> Option<&'static str>

Source

fn call_with_argv( &self, info: Info, argv: Vec<String>, ) -> Result<Pin<Box<dyn Future<Output = Result<Value, Error>>>>, Error>

Source

fn help(&self) -> Vec<&'static str>

Provided Methods§

Implementors§