Trait Validate

Source
pub trait Validate: Sealed {
    // Required method
    fn validate<R: Rule + ?Sized>(&self) -> Result<()>
       where Self: Validation<R>;
}
Expand description

Validation trait’s shim allowing to specify its Rule as a method’s type parameter.

Required Methods§

Source

fn validate<R: Rule + ?Sized>(&self) -> Result<()>
where Self: Validation<R>,

Checks whether the specified validation Rule is satisfied.

§Errors

If validation fails.

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: ?Sized> Validate for T