Trait Validate

Source
pub trait Validate<T, E> {
    // Required methods
    fn valid(self) -> Validation<T, E>;
    fn validate(self, errors: &mut Vec<E>) -> Validation<T, E>
       where E: Clone;
    fn recover(self, errors: &mut Vec<E>) -> Validation<T, E>
       where T: Default;
}

Required Methods§

Source

fn valid(self) -> Validation<T, E>

Source

fn validate(self, errors: &mut Vec<E>) -> Validation<T, E>
where E: Clone,

Source

fn recover(self, errors: &mut Vec<E>) -> Validation<T, E>
where T: Default,

Implementations on Foreign Types§

Source§

impl<T, E> Validate<T, E> for Option<T>
where E: From<()>,

Source§

fn valid(self) -> Validation<T, E>

Source§

fn validate(self, errors: &mut Vec<E>) -> Validation<T, E>
where E: Clone,

Source§

fn recover(self, errors: &mut Vec<E>) -> Validation<T, E>
where T: Default,

Source§

impl<T, E, F> Validate<T, E> for Result<T, F>
where E: From<F>,

Source§

fn valid(self) -> Validation<T, E>

Source§

fn validate(self, errors: &mut Vec<E>) -> Validation<T, E>
where E: Clone,

Source§

fn recover(self, errors: &mut Vec<E>) -> Validation<T, E>
where T: Default,

Implementors§

Source§

impl<T, E, F> Validate<T, E> for Validation<T, F>
where E: From<F>,