pub enum Error {
AddrParse(AddrParseError),
Internal(String),
InvalidArgument(String),
Io(Error),
StringParse(ParseError),
Values(ValueError),
}Expand description
Error represents the various errors which can come up while parsing command-line flags.
Variants§
AddrParse(AddrParseError)
An error parsing an IP address.
Internal(String)
An internal unrecoverable error, usually due to some underlying library.
InvalidArgument(String)
Errors akin to EINVAL - essentially, an argument passed into a function was invalid in some way..
Io(Error)
An I/O error, generally encountered when interacting with the filesystem.
StringParse(ParseError)
An awkward hack; this error exists to use String’s FromStr impl, but this operation won’t actually ever fail.
Values(ValueError)
A flaggy_values error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<AddrParseError> for Error
impl From<AddrParseError> for Error
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ValueError> for Error
impl From<ValueError> for Error
Source§fn from(source: ValueError) -> Self
fn from(source: ValueError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more