Trait roadblk::Validator

source ·
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<Option<D>> for T
where T: Validator<D>,

§

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

source§

impl<T, const MIN: usize, const MAX: usize> Validator<T> for LengthValidator<MIN, MAX>
where T: HasLength,