[][src]Trait vale::Validate

pub trait Validate {
    fn validate(&mut self) -> Result;
}

The core trait of this library. Any entity that implements Validate can be validated by running the validate function. This will either return an Ok(()), or an Err containing a list of errors that were triggered during validation. It is also possible for validate to perform tranformations on the entity that is being validated.

Required methods

fn validate(&mut self) -> Result

Performs the validation.

Loading content...

Implementors

impl<T, U> Validate for U where
    U: Deref<Target = T> + DerefMut,
    T: Validate
[src]

Loading content...