Enum nu_protocol::PositionalType
source · [−]pub enum PositionalType {
Mandatory(String, SyntaxShape),
Optional(String, SyntaxShape),
}
Expand description
The type of positional arguments
Variants
Mandatory(String, SyntaxShape)
A mandatory positional argument with the expected shape of the value
Optional(String, SyntaxShape)
An optional positional argument with the expected shape of the value
Implementations
Helper to create a mandatory positional argument type
Helper to create a mandatory positional argument with an “any” type
Helper to create a mandatory positional argument with a block type
Helper to create a optional positional argument type
Helper to create a optional positional argument with an “any” type
Gets the expected type of a positional argument
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 !=
.
Prepare the PositionalType for pretty-printing
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 PositionalType
impl Send for PositionalType
impl Sync for PositionalType
impl Unpin for PositionalType
impl UnwindSafe for PositionalType
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.