Check

Trait Check 

Source
pub trait Check<T, Pre>
where Self: Sized,
{ type State; type Error; // Required method fn check( self, value: CheckState<T, Pre>, ) -> CheckOutcome<T, Self::State, Self::Error>; // Provided methods fn and<B, C>(self, b: B) -> And<Self, B, C> where B: Check<T, Self::State>, C: CombineErrorBuilder<Self::Error, B::Error> { ... } fn or<B, C>(self, b: B) -> Or<Self, B, C> where B: Check<T, Self::State>, C: CombineErrorBuilder<Self::Error, B::Error> { ... } }

Required Associated Types§

Required Methods§

Source

fn check( self, value: CheckState<T, Pre>, ) -> CheckOutcome<T, Self::State, Self::Error>

Provided Methods§

Source

fn and<B, C>(self, b: B) -> And<Self, B, C>
where B: Check<T, Self::State>, C: CombineErrorBuilder<Self::Error, B::Error>,

Source

fn or<B, C>(self, b: B) -> Or<Self, B, C>
where B: Check<T, Self::State>, C: CombineErrorBuilder<Self::Error, B::Error>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, Pre, A, B, C> Check<T, Pre> for And<A, B, C>
where A: Check<T, Pre>, B: Check<T, A::State>, C: CombineErrorBuilder<A::Error, B::Error>,

Source§

type State = <B as Check<T, <A as Check<T, Pre>>::State>>::State

Source§

type Error = <<C as CombineErrorBuilder<<A as Check<T, Pre>>::Error, <B as Check<T, <A as Check<T, Pre>>::State>>::Error>>::Combiner as CombineError<<A as Check<T, Pre>>::Error, <B as Check<T, <A as Check<T, Pre>>::State>>::Error>>::Out

Source§

impl<T, Pre, A, B, C> Check<T, Pre> for Or<A, B, C>
where A: Check<T, Pre>, B: Check<T, A::State>, C: CombineErrorBuilder<A::Error, B::Error>,

Source§

type State = <B as Check<T, <A as Check<T, Pre>>::State>>::State

Source§

type Error = <C as CombineErrorBuilder<<A as Check<T, Pre>>::Error, <B as Check<T, <A as Check<T, Pre>>::State>>::Error>>::Out

Source§

impl<T, Pre, State, F, E> Check<T, Pre> for F
where F: Fn(CheckState<T, Pre>) -> CheckOutcome<T, State, E>,

Source§

type State = State

Source§

type Error = E