[][src]Enum parse_arg::ValueError

pub enum ValueError<E> {
    InvalidValue(E),
    MissingValue,
}

Error that can occur durin parsing command-line argument.

Variants

InvalidValue(E)

The value couldn't be parsed because of the invalid format.

MissingValue

The value to the argument is missing - too few arguments.

Methods

impl<E> ValueError<E>[src]

pub fn map_or<R, F: FnOnce(E) -> R>(self, default: R, f: F) -> R[src]

Applies function to the contained error (if any), or returns the provided default (if not).

This is practically the same thing what Option<E> would do.

Trait Implementations

impl<E: Clone> Clone for ValueError<E>[src]

impl<E: Copy> Copy for ValueError<E>[src]

impl<E: Eq> Eq for ValueError<E>[src]

impl<E: PartialEq> PartialEq<ValueError<E>> for ValueError<E>[src]

impl<E: Debug> Debug for ValueError<E>[src]

Auto Trait Implementations

impl<E> Send for ValueError<E> where
    E: Send

impl<E> Sync for ValueError<E> where
    E: Sync

impl<E> Unpin for ValueError<E> where
    E: Unpin

impl<E> UnwindSafe for ValueError<E> where
    E: UnwindSafe

impl<E> RefUnwindSafe for ValueError<E> where
    E: RefUnwindSafe

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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