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§
sourcefn handle(
&mut self,
input_iter: &mut Peekable<&mut Iter<'_, String>>
) -> Result<(), String>
fn handle( &mut self, input_iter: &mut Peekable<&mut Iter<'_, String>> ) -> Result<(), String>
Handles argument. Gets all needed values from input iterator.
sourcefn is_by_short(&self, name: char) -> bool
fn is_by_short(&self, name: char) -> bool
Check if this argument is identified by specified short name.
sourcefn is_by_long(&self, name: &str) -> bool
fn is_by_long(&self, name: &str) -> bool
Check if this argument is identified by specified long name.
sourcefn identification(&self) -> &ArgumentIdentification
fn identification(&self) -> &ArgumentIdentification
Get this arguments identification.