Enum nu_errors::ArgumentError [−][src]
pub enum ArgumentError {
MissingMandatoryFlag(String),
MissingMandatoryPositional(String),
MissingValueForName(String),
UnexpectedArgument(Spanned<String>),
UnexpectedFlag(Spanned<String>),
InvalidExternalWord,
BadValue(String),
}
Expand description
ArgumentError describes various ways that the parser could fail because of unexpected arguments. Nu commands are like a combination of functions and macros, and these errors correspond to problems that could be identified during expansion based on the syntactic signature of a command.
Variants
MissingMandatoryFlag(String)
Tuple Fields
0: String
The command specified a mandatory flag, but it was missing.
MissingMandatoryPositional(String)
Tuple Fields
0: String
The command specified a mandatory positional argument, but it was missing.
MissingValueForName(String)
Tuple Fields
0: String
A flag was found, and it should have been followed by a value, but no value was found
UnexpectedArgument(Spanned<String>)
An argument was found, but the command does not recognize it
UnexpectedFlag(Spanned<String>)
An flag was found, but the command does not recognize it
InvalidExternalWord
A sequence of characters was found that was not syntactically valid (but would have been valid if the command was an external command)
BadValue(String)
Tuple Fields
0: String
A bad value in this location
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
Auto Trait Implementations
impl RefUnwindSafe for ArgumentError
impl Send for ArgumentError
impl Sync for ArgumentError
impl Unpin for ArgumentError
impl UnwindSafe for ArgumentError
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.