pub trait Validator<Data> {
    type Error;

    // Required methods
    fn validate(data: &Data) -> Result<(), Self::Error>;
    fn constraint_type() -> ConstraintType;
}

Required Associated Types§

Required Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<D, T: Validator<D>> Validator<Option<D>> for T

§

type Error = <T as Validator<D>>::Error