[][src]Enum nu_errors::ArgumentError

pub enum ArgumentError {
    MissingMandatoryFlag(String),
    MissingMandatoryPositional(String),
    MissingValueForName(String),
    UnexpectedArgument(Spanned<String>),
    UnexpectedFlag(Spanned<String>),
    InvalidExternalWord,
}

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)

The command specified a mandatory flag, but it was missing.

MissingMandatoryPositional(String)

The command specified a mandatory positional argument, but it was missing.

MissingValueForName(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)

Trait Implementations

impl Clone for ArgumentError[src]

impl Debug for ArgumentError[src]

impl<'de> Deserialize<'de> for ArgumentError[src]

impl Eq for ArgumentError[src]

impl Hash for ArgumentError[src]

impl Ord for ArgumentError[src]

impl PartialEq<ArgumentError> for ArgumentError[src]

impl PartialOrd<ArgumentError> for ArgumentError[src]

impl PrettyDebug for ArgumentError[src]

impl Serialize for ArgumentError[src]

impl StructuralEq for ArgumentError[src]

impl StructuralPartialEq for ArgumentError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> PrettyDebugWithSource for T where
    T: PrettyDebug
[src]

impl<T> SpannedItem for T[src]

impl<T> TaggedItem for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.