Struct clap::Error [−][src]
Command Line Argument Parser Error
Fields
message: String
Formatted error message
kind: ErrorKind
The type of error
info: Option<Vec<String>>
Any additional information passed along, such as the argument name that caused the error
Methods
impl Error
[src]
impl Error
pub fn use_stderr(&self) -> bool
[src]
pub fn use_stderr(&self) -> bool
Should the message be written to stdout
or not
pub fn exit(&self) -> !
[src]
pub fn exit(&self) -> !
Prints the error to stderr
and exits with a status of 1
pub fn with_description(description: &str, kind: ErrorKind) -> Self
[src]
pub fn with_description(description: &str, kind: ErrorKind) -> Self
Create an error with a custom description.
This can be used in combination with Error::exit
to exit your program
with a custom error message.
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl StdError for Error
[src]
impl StdError for Error
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
1.0.0
[src]The lower-level cause of this error, if any. Read more
impl Display for Error
[src]
impl Display for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Error> for Error
[src]
impl From<Error> for Error
impl From<Error> for Error
[src]
impl From<Error> for Error