[][src]Struct gumdrop::Error

pub struct Error { /* fields omitted */ }

Represents an error encountered during argument parsing

Methods

impl Error[src]

pub fn failed_parse(opt: Opt, err: String) -> Error[src]

Returns an error for a failed attempt at parsing an option value.

pub fn failed_parse_default(
    option: &'static str,
    value: &'static str,
    err: String
) -> Error
[src]

Returns an error for a failed attempt at parsing an option's default value.

pub fn failed_parse_with_name(name: String, err: String) -> Error[src]

Returns an error for a failed attempt at parsing an option value.

pub fn insufficient_arguments(opt: Opt, expected: usize, found: usize) -> Error[src]

Returns an error for an option expecting two or more arguments not receiving the expected number of arguments.

pub fn unexpected_argument(opt: Opt) -> Error[src]

Returns an error for an option receiving an unexpected argument value, e.g. --option=value.

pub fn unexpected_single_argument(opt: Opt, n: usize) -> Error[src]

Returns an error for an option expecting two or more argument values receiving only one in the long form, e.g. --option=value.

These options must be passed as, e.g. --option value second-value [...].

pub fn missing_argument(opt: Opt) -> Error[src]

Returns an error for a missing required argument.

pub fn missing_command() -> Error[src]

Returns an error for a missing command name.

pub fn missing_required(opt: &str) -> Error[src]

Returns an error for a missing required option.

pub fn missing_required_command() -> Error[src]

Returns an error for a missing required command.

pub fn missing_required_free() -> Error[src]

Returns an error for a missing required free argument.

pub fn unexpected_free(arg: &str) -> Error[src]

Returns an error when a free argument was encountered, but the options type does not support free arguments.

pub fn unrecognized_command(name: &str) -> Error[src]

Returns an error for an unrecognized command.

pub fn unrecognized_option(opt: Opt) -> Error[src]

Returns an error for an unrecognized option.

pub fn unrecognized_long(opt: &str) -> Error[src]

Returns an error for an unrecognized long option, e.g. --option.

pub fn unrecognized_short(opt: char) -> Error[src]

Returns an error for an unrecognized short option, e.g. -o.

Trait Implementations

impl Display for Error[src]

impl Debug for Error[src]

impl Error for Error[src]

Auto Trait Implementations

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

impl RefUnwindSafe for Error

Blanket Implementations

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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.

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

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

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