pub struct ArgBuilder<'r, 'a, T> { /* private fields */ }
Expand description

Builder for providing additional argument information for error reporting.

Implementations§

Provides a name for this argument. If an old name is already set, it is silently replaced. The name can either be borrowed from the environment or owned.

Provides a more readable type name for this argument. If an old name is already set, it is silently replaced. If no type name is given, a value from std::any::type_name is used. The name can either be borrowed from the environment or owned.

Provides a call site for this argument. If an old call site is already set, it is silently replaced. If given, the site will be used in case of error.

Get the converted argument value.

Errors

If the argument is missing, or cannot be converted to the desired type.

Get the argument as optional.

Errors

If the argument is present, but cannot be converted to the desired type.

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.