pub struct NumberArgument<N, S> { /* private fields */ }
Expand description

Numeric argument parser.

This type can be bounded between a minimum and maximum value (standard MIN and MAX of type N). A parse method for type N must be provided also.

Implementations

Set a minimum value for this argument (inclusive).

Set a maximum value for this argument (inclusive).

Trait Implementations

Usage that is returned.
Return a new SingleUsage, this represents the path from the root up until this parser. Read more

This implementation may return a Failure when the parsed number is outside of the bounds.

The returned MultipleUsage iterator.
Return a new MultipleUsage based on self (without consuming self).
Branching parser used by this type.
Returns the braching parser Self::Output initialized with self and a child argument. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.