/// Semantics for a piece of error information #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] #[cfg(feature = "error-context")] pubenum ContextKind { /// The cause of the error
InvalidSubcommand, /// The cause of the error
InvalidArg, /// Existing arguments
PriorArg, /// Accepted subcommands
ValidSubcommand, /// Accepted values
ValidValue, /// Rejected values
InvalidValue, /// Number of values present
ActualNumValues, /// Number of allowed values
ExpectedNumValues, /// Minimum number of allowed values
MinValues, /// Potential fix for the user
SuggestedCommand, /// Potential fix for the user
SuggestedSubcommand, /// Potential fix for the user
SuggestedArg, /// Potential fix for the user
SuggestedValue, /// Trailing argument
TrailingArg, /// Potential fix for the user
Suggested, /// A usage string
Usage, /// An opaque message to the user
Custom,
}
/// A piece of error information #[derive(Clone, Debug, PartialEq, Eq)] #[non_exhaustive] #[cfg(feature = "error-context")] pubenum ContextValue { /// [`ContextKind`] is self-sufficient, no additional information needed
None, /// A single value
Bool(bool), /// A single value
String(String), /// Many values
Strings(Vec<String>), /// A single value
StyledStr(crate::builder::StyledStr), /// many value
StyledStrs(Vec<crate::builder::StyledStr>), /// A single value
Number(isize),
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.