Enum ContextKind
enum ContextKind
Semantics for a piece of error information
Variants
-
InvalidSubcommand The cause of the error
-
InvalidArg The cause of the error
-
PriorArg Existing arguments
-
ValidSubcommand Accepted subcommands
-
ValidValue Accepted values
-
InvalidValue Rejected values
-
ActualNumValues Number of values present
-
ExpectedNumValues Number of allowed values
-
MinValues Minimum number of allowed values
-
SuggestedCommand Potential fix for the user
-
SuggestedSubcommand Potential fix for the user
-
SuggestedArg Potential fix for the user
-
SuggestedValue Potential fix for the user
-
TrailingArg Trailing argument
-
Suggested Potential fix for the user
-
Usage A usage string
-
Custom An opaque message to the user
Implementations
impl ContextKind
fn as_str(self: Self) -> Option<&'static str>End-user description of the error case, where relevant
impl Clone for ContextKind
fn clone(self: &Self) -> ContextKind
impl Copy for ContextKind
impl Debug for ContextKind
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for ContextKind
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for ContextKind
impl Freeze for ContextKind
impl Hash for ContextKind
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for ContextKind
fn eq(self: &Self, other: &ContextKind) -> bool
impl RefUnwindSafe for ContextKind
impl Send for ContextKind
impl StructuralPartialEq for ContextKind
impl Sync for ContextKind
impl Unpin for ContextKind
impl UnsafeUnpin for ContextKind
impl UnwindSafe for ContextKind
impl<T> Any for ContextKind
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ContextKind
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ContextKind
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for ContextKind
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for ContextKind
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for ContextKind
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for ContextKind
fn to_string(self: &Self) -> String
impl<T, U> Into for ContextKind
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for ContextKind
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ContextKind
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>