[−][src]Struct trivial_argument_parser::Argument
Argument struct allows to specify type of expected argument, its names and after parsing contains results.
Examples
use trivial_argument_parser::*; let mut example_argument = Argument::new(Some('l'), Some("an-list"), ArgType::ValueList).unwrap();
Fields
arg_result: Option<ArgResult>Implementations
impl Argument[src]
pub fn new(
short: Option<char>,
long: Option<&str>,
arg_type: ArgType
) -> Result<Argument, String>[src]
short: Option<char>,
long: Option<&str>,
arg_type: ArgType
) -> Result<Argument, String>
Create new Argument. You need to specify at least one name (short or long) or you can specify both. Parameter arg_type changes how the parsing will treat the argument.
pub fn add_value(
&mut self,
input_iter: &mut Iter<'_, String>
) -> Result<(), String>[src]
&mut self,
input_iter: &mut Iter<'_, String>
) -> Result<(), String>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl UnwindSafe for Argument
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,