Skip to main content

Validate

Trait Validate 

Source
pub trait Validate {
    // Required method
    fn validate(&self) -> Result<(), Vec<Violation>>;
}
Expand description

Types that can check their own invariants after extraction.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Validate> Validate for Json<T>

Transparent: validating a wrapper validates the payload.

Implementors§