[][src]Trait read_input::InputConstraints

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 { ... } }

Trait for changing input settings by adding constraints that require PartialOrd on the input type.

Provided methods

fn min(self, min: T) -> Self

Sets a minimum input value.

fn min_err(self, min: T, err: impl ToString) -> Self

Sets a minimum input value with custom error message.

fn max(self, max: T) -> Self

Sets a maximum input value.

fn max_err(self, max: T, err: impl ToString) -> Self

Sets a maximum input value with custom error message.

fn min_max(self, min: T, max: T) -> Self

Sets a minimum and maximum input value.

fn min_max_err(self, min: T, max: T, err: impl ToString) -> Self

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

fn not(self, this: T) -> Self

Sets a restricted input value.

fn not_err(self, this: T, err: impl ToString) -> Self

Sets a restricted input value with custom error message.

Loading content...

Implementors

impl<T: FromStr + PartialOrd + 'static> InputConstraints<T> for InputBuilder<T>[src]

impl<T: FromStr + PartialOrd + 'static> InputConstraints<T> for InputBuilderOnce<T>[src]

Loading content...