Skip to main content

Validator

Trait Validator 

Source
pub trait Validator<C>: Send + Sync {
    // Required methods
    fn check(&self, ctx: &C) -> ValidationResult;
    fn name(&self) -> &'static str;
}
Expand description

A single check on a context value.

Required Methods§

Source

fn check(&self, ctx: &C) -> ValidationResult

Source

fn name(&self) -> &'static str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§