Trait cli_rs::input::Input

source ·
pub trait Input {
    // Required methods
    fn parsed(&self) -> bool;
    fn has_default(&self) -> bool;
    fn parse(&mut self, token: &str) -> CliResult<bool>;
    fn display_name(&self) -> String;
    fn description(&self) -> Option<String>;
    fn type_name(&self) -> InputType;
    fn is_bool_flag(&self) -> bool;
    fn complete(&mut self, value: &str) -> CliResult<Vec<String>>;
}
Expand description

parser complexities:

compound flags (-am)

optional flags

out of order flags

Required Methods§

source

fn parsed(&self) -> bool

source

fn has_default(&self) -> bool

source

fn parse(&mut self, token: &str) -> CliResult<bool>

source

fn display_name(&self) -> String

source

fn description(&self) -> Option<String>

source

fn type_name(&self) -> InputType

source

fn is_bool_flag(&self) -> bool

source

fn complete(&mut self, value: &str) -> CliResult<Vec<String>>

Implementors§

source§

impl<'a, T: FromStr + Clone> Input for Arg<'a, T>

source§

impl<'a, T: FromStr + Default + Clone> Input for Flag<'a, T>