[][src]Trait simpleargs::arg::ArgString

pub trait ArgString: Sized {
    fn parse_arg(self) -> Result<ParsedArg<Self>, Self>;
fn to_str(&self) -> Option<&str>;
fn to_osstr(&self) -> &OsStr; }

Trait for string types that can be parsed as command-line arguments.

Required methods

fn parse_arg(self) -> Result<ParsedArg<Self>, Self>

Parse the string as a command-line argument.

On failure, return the input.

fn to_str(&self) -> Option<&str>

Convert the argument into a str if it is a valid Unicode string.

fn to_osstr(&self) -> &OsStr

Convert the argument into an OsStr.

Loading content...

Implementations on Foreign Types

impl ArgString for String[src]

impl ArgString for OsString[src]

Loading content...

Implementors

Loading content...