Trait read_input::InputConstraints[][src]

pub trait InputConstraints<T>: InputBuild<T> where
    T: FromStr + PartialOrd + 'static,
    Self: Sized
{ fn min(self, min: T) -> Self { ... }
fn min_err(self, min: T, err: impl ToString) -> Self { ... }
fn max(self, max: T) -> Self { ... }
fn max_err(self, max: T, err: impl ToString) -> Self { ... }
fn min_max(self, min: T, max: T) -> Self { ... }
fn min_max_err(self, min: T, max: T, err: impl ToString) -> Self { ... }
fn not(self, this: T) -> Self { ... }
fn not_err(self, this: T, err: impl ToString) -> Self { ... } }
Expand description

A set of validation tests that use InputBuild::test under the hood.

Provided methods

Sets a minimum input value.

Sets a minimum input value with custom error message.

Sets a maximum input value.

Sets a maximum input value with custom error message.

Sets a minimum and maximum input value.

Sets a minimum and maximum input value with custom error message.

Sets a restricted input value.

Sets a restricted input value with custom error message.

Implementors