[][src]Struct cmd_args::option::Descriptor

pub struct Descriptor { /* fields omitted */ }

Description of an option.

Methods

impl Descriptor[src]

pub fn new(name: &str, value_type: Type, description: &str) -> Self[src]

Create a new option descriptor.

pub fn name(&self) -> &String[src]

Get the name of the option.

pub fn take_name(&self) -> Rc<String>[src]

Take a reference to the name of the option.

pub fn value_type(&self) -> &Type[src]

Get the type of the option value.

pub fn description(&self) -> &String[src]

Get the description of the option.

pub fn add_alias(self, alias: &str) -> Self[src]

Add an alias to the option.

pub fn get_aliases(&self) -> &HashSet<String>[src]

Get aliases.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.