pub trait HandleableArgument<'a> {
    // Required methods
    fn handle(
        &mut self,
        input_iter: &mut Peekable<&mut Iter<'_, String>>
    ) -> Result<(), String>;
    fn is_by_short(&self, name: char) -> bool;
    fn is_by_long(&self, name: &str) -> bool;
    fn identification(&self) -> &ArgumentIdentification;
}
Expand description

Unifies how parsable arguments are parsed.

Required Methods§

source

fn handle( &mut self, input_iter: &mut Peekable<&mut Iter<'_, String>> ) -> Result<(), String>

Handles argument. Gets all needed values from input iterator.

source

fn is_by_short(&self, name: char) -> bool

Check if this argument is identified by specified short name.

source

fn is_by_long(&self, name: &str) -> bool

Check if this argument is identified by specified long name.

source

fn identification(&self) -> &ArgumentIdentification

Get this arguments identification.

Implementors§