pub struct Arguments<'a> { /* private fields */ }
Expand description

Arguments passed to a varargs function.

This is a wrapper that does things like type-checking and arity-checking.

Implementations

Creates a new Arguments from a raw argument list, as is passed into a raw function.

Returns the number of arguments passed to the function.

Raises an error if there weren’t exactly n arguments passed to the function.

Raises an error if there weren’t at least n arguments passed to the function.

Returns the self parameter as a value.

Returns the nth argument, or None if the argument is not present.

Returns the nth argument converted into the given type. Returns an error if there aren’t enough arguments.

Returns the raw array of arguments.

Trait Implementations

Formats the value using the given formatter. 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.