Struct nu_protocol::EvaluatedArgs[][src]

pub struct EvaluatedArgs {
    pub positional: Option<Vec<Value>>,
    pub named: Option<IndexMap<String, Value>>,
}
Expand description

The set of positional and named arguments, after their values have been evaluated.

  • Positional arguments are those who are given as values, without any associated flag. For example, in foo arg1 arg2, both arg1 and arg2 are positional arguments.
  • Named arguments are those associated with a flag. For example, foo --given bar the named argument would be name given and the value bar.

Fields

positional: Option<Vec<Value>>named: Option<IndexMap<String, Value>>

Implementations

Constructs a new EvaluatedArgs.

Retrieve a subset of positional arguments starting at a given position

Get the nth positional argument, if possible

Get the nth positional argument, error if not possible

Get the number of positional arguments available

Return if there are no positional arguments

Return true if the set of named arguments contains the name provided

Gets the corresponding Value for the named argument given, if possible

Gets the corresponding Value for the named argument given, error if not possible

Iterates over the positional arguments

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts a value into a Spanned value

Converts a value into a Spanned value, using an unknown Span

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.