pub struct InputBuilder<'a, T: FromStr> { /* private fields */ }
Expand description

InputBuilder is a ‘builder’ used to store the settings that are used to fetch input.

Implementations§

Creates a new instance of InputBuilder with default settings.

Changes or adds a prompt message. This is documented in the readme

Changes or adds a prompt message and makes it repeat. This is documented in the readme

Changes fallback error message. This is documented in the readme

Changes or adds a default input value. This is documented in the readme

Adds a validation check on input. This is documented in the readme

Adds a validation check on input with custom error message. This is documented in the readme

Removes all validation checks made by .add_test() and .add_err_test().

Used specify custom error messages that depend on the errors produced by from_str(). This is documented in the readme

‘gets’ the input form the user. This is documented in the readme

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.