pub struct CliError {
pub rule: CliErrorRule,
pub message: String,
pub hint: String,
}Expand description
Structured CLI-resolution error. It never contains raw argument values.
rule is the classification and the only thing worth branching on; the two
strings are for a human. The command path and the implicated argument names
are not fields: both are already inside hint and message respectively,
and a second, stringly-typed copy of either is a place for them to drift.
Fields§
§rule: CliErrorRule§message: String§hint: StringImplementations§
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()
impl StructuralPartialEq for CliError
Auto Trait Implementations§
impl Forget for CliError
impl Freeze for CliError
impl Move for CliError
impl RefUnwindSafe for CliError
impl Send for CliErrorwhere
RawVecInner: Send,
impl Sync for CliErrorwhere
RawVecInner: Sync,
impl Unpin for CliError
impl UnsafeUnpin for CliError
impl UnwindSafe for CliErrorwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.