pub trait Arg: Sized + AsRef<OsStr> {
fn parse<T: ParseArg>(self) -> Result<T, <T as ParseArg>::Error>;
}Expand description
A type that can be parsed.
Usually &OsStr or OsString. It’s used to automatically pick the right
method if ParseArg trait.
Required Methods§
Implementations on Foreign Types§
source§impl Arg for String
impl Arg for String
Using this with std::env::args() is not a good practice, but it may be
useful for testing.
source§impl<'a> Arg for &'a str
impl<'a> Arg for &'a str
Using this with std::env::args() is not a good practice, but it may be
useful for testing.