Skip to main content

ValidationDsl

Trait ValidationDsl 

Source
pub trait ValidationDsl {
    // Required methods
    fn validates_each<I, S, F>(&mut self, attributes: I, validate_fn: F)
       where I: IntoIterator<Item = S>,
             S: Into<String>,
             F: Fn(&str, Option<&Value>, &mut Errors) + Send + Sync + 'static;
    fn validate<F>(&mut self, validate_fn: F)
       where F: Fn(&dyn Fn(&str) -> Option<Value>, &mut Errors) + Send + Sync + 'static;
}

Required Methods§

Source

fn validates_each<I, S, F>(&mut self, attributes: I, validate_fn: F)
where I: IntoIterator<Item = S>, S: Into<String>, F: Fn(&str, Option<&Value>, &mut Errors) + Send + Sync + 'static,

Source

fn validate<F>(&mut self, validate_fn: F)
where F: Fn(&dyn Fn(&str) -> Option<Value>, &mut Errors) + Send + Sync + 'static,

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§