Skip to main content

Validator

Trait Validator 

Source
pub trait Validator {
    // Required method
    fn validate(&self, item: &Value, _: &str) -> ValidatorResult;
}

Required Methods§

Source

fn validate(&self, item: &Value, _: &str) -> ValidatorResult

Trait Implementations§

Source§

impl Debug for dyn Validator + 'static

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Validator for Regex

Source§

fn validate(&self, val: &Value, path: &str) -> ValidatorResult

Implementors§