Enum nu_protocol::NamedType
source · [−]pub enum NamedType {
Switch(Option<char>),
Mandatory(Option<char>, SyntaxShape),
Optional(Option<char>, SyntaxShape),
}
Expand description
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
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
Auto Trait Implementations
impl RefUnwindSafe for NamedType
impl UnwindSafe for NamedType
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.