pub enum CliError {
UnknownCommand,
UnknownCommandName {
command: String,
next: &'static str,
},
MissingArgument {
argument: &'static str,
next: &'static str,
},
MissingFlagValue {
flag: &'static str,
next: &'static str,
},
DuplicateFlag {
flag: &'static str,
next: &'static str,
},
UnexpectedArgument {
argument: String,
command: &'static str,
next: &'static str,
},
UnknownFlag {
flag: String,
next: &'static str,
},
UnsupportedFlag {
flag: String,
command: &'static str,
next: &'static str,
},
UnknownResource {
resource: String,
next: &'static str,
},
UnknownStatus(String),
UnknownLogLevel(String),
InvalidLimit(String),
}Expand description
CLI parsing error.
Variants§
UnknownCommand
Command is missing or unsupported.
UnknownCommandName
Command name is unsupported.
MissingArgument
Required command argument is missing.
MissingFlagValue
Required flag value is missing.
DuplicateFlag
Flag is present more than once.
UnexpectedArgument
Positional argument is unsupported for the selected command.
Fields
UnknownFlag
Flag is unknown for the selected command.
UnsupportedFlag
Flag is known globally but unsupported for the selected command.
Fields
UnknownResource
Resource is unsupported for the selected command.
UnknownStatus(String)
Issue status is unsupported.
UnknownLogLevel(String)
Log level is unsupported.
InvalidLimit(String)
Row limit is malformed.
Trait Implementations§
impl Eq for CliError
Source§impl Error for CliError
impl Error for CliError
1.30.0 · 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<CliError> for RuntimeError
impl From<CliError> for RuntimeError
impl StructuralPartialEq for CliError
Auto Trait Implementations§
impl Freeze for CliError
impl RefUnwindSafe for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnsafeUnpin for CliError
impl UnwindSafe for CliError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.