[][src]Struct qargparser::Spec

pub struct Spec<C> { /* fields omitted */ }

Option/argument specification.

Implementations

impl<C> Spec<C>[src]

pub fn is_capture_rest(&self) -> bool[src]

Return a boolean indicating whether this arg spec is configured to capture all the remaining arguments.

pub fn is_exit(&self) -> bool[src]

Return boolean indicating whether this arg spec will abort the parser.

pub fn is_opt(&self) -> bool[src]

Return boolean indicating whether this arg spec represents an "option".

"Options" come in two forms: short or long

Short options are in the form "", like "-h", "-f".

Long options are in the form "", like "--help", --file".

This function will return true for either form.

pub fn is_pos(&self) -> bool[src]

Return boolean indicating whether this arg is a positional argument.

pub fn is_req(&self) -> bool[src]

pub fn is_hidden(&self) -> bool[src]

pub fn get_nargs(&self) -> usize[src]

pub fn req_args(&self) -> bool[src]

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

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

Generate a string that shows a representation of this argument specification suitable for use in a "Usage: " string.

Required parameters are enclosed by '<' and '>' charcters. Optional parameters are enclossed by '[' and ']' characters.

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

pub fn get_help_text(&self) -> &Vec<String>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for Spec<C>[src]

impl<C> Send for Spec<C>[src]

impl<C> Sync for Spec<C>[src]

impl<C> Unpin for Spec<C>[src]

impl<C> UnwindSafe for Spec<C>[src]

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.