Struct clap::Error
[−]
[src]
pub struct Error { pub message: String, pub kind: ErrorKind, pub info: Option<Vec<String>>, }
Command Line Argument Parser Error
Fields
message: String
Formated 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]
fn use_stderr(&self) -> bool
Should the message be written to stdout
or not
fn exit(&self) -> !
Prints the error to stderr
and exits with a status of 1
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 StdError for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0
The lower-level cause of this error, if any. Read more