[−][src]Struct gumdrop::Error
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]
option: &'static str,
value: &'static str,
err: String
) -> Error
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
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,