[][src]Trait argh::FromArgValue

pub trait FromArgValue: Sized {
    fn from_arg_value(value: &str) -> Result<Self, String>;
}

Types which can be constructed from a single commandline value.

Any field type declared in a struct that derives FromArgs must implement this trait. A blanket implementation exists for types implementing FromStr<Error: Display>. Custom types can implement this trait directly.

Required methods

fn from_arg_value(value: &str) -> Result<Self, String>

Construct the type from a commandline value, returning an error string on failure.

Loading content...

Implementors

impl<T> FromArgValue for T where
    T: FromStr,
    T::Err: Display
[src]

Loading content...