Enum nu_protocol::NamedType[][src]

pub enum NamedType {
    Switch(Option<char>),
    Mandatory(Option<char>, SyntaxShape),
    Optional(Option<char>, SyntaxShape),
}

The types of named parameter that a command can have

Variants

Switch(Option<char>)

A flag without any associated argument. eg) foo --bar, foo -b

Mandatory(Option<char>, SyntaxShape)

A mandatory flag, with associated argument. eg) foo --required xyz, foo -r xyz

Optional(Option<char>, SyntaxShape)

An optional flag, with associated argument. eg) foo --optional abc, foo -o abc

Implementations

impl NamedType[src]

pub fn get_short(&self) -> Option<char>[src]

Trait Implementations

impl Clone for NamedType[src]

impl Debug for NamedType[src]

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

impl Eq for NamedType[src]

impl PartialEq<NamedType> for NamedType[src]

impl Serialize for NamedType[src]

impl StructuralEq for NamedType[src]

impl StructuralPartialEq for NamedType[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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.