Skip to main content

Validate

Trait Validate 

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

Validator implemented for DTOs. Called by body parsing; validate may also be invoked directly.

Required Methods§

Source

fn validate(&self) -> Result<(), ValidationException>

Checks the value, returning the first failure as a ValidationException.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§