Struct foropts::Arg [] [src]

pub struct Arg<'a, T> { /* fields omitted */ }

A description of an argument, which may be a Boolean flag or carry a parameter.

Parameters

<'a> – The lifetime of the argument’s action

<T> – The result type of the argument

Methods

impl<'a, T> Arg<'a, T>
[src]

[src]

Creates a new Boolean flag whose action is the given thunk.

[src]

Creates a new argument with raw string parameter.

Parameters

<S> – type converted to String to name the parameter

<F> – type of parsing function

name – the name of the parameter

parser – the parsing function, which must convert the raw &str to a Result<T>

[src]

Creates a new argument with a parameter parsed by str::parse.

Parameters

<A> – type into which the raw &str will be automatically parsed

<S> – type converted to String to name the parameter

<F> – type of the wrapping function

name – the name of the parameter

wrapper – function applied to successful parsing result to transform A to T

[src]

Sets the short name of the option.

[src]

Sets the long name of the option.

[src]

Sets the description of the option (for the help message).

Trait Implementations

impl<'a, T> Debug for Arg<'a, T>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a, T> !Send for Arg<'a, T>

impl<'a, T> !Sync for Arg<'a, T>