Trait Validate

Source
pub trait Validate:
    ValidateField
    + ValidateRequest
    + Send
    + Sync {
    // Provided method
    fn validate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        data: &'life1 HashMap<String, Value>,
    ) -> Pin<Box<dyn Future<Output = ValidationResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Main validation trait that combines field and request validation

Provided Methods§

Source

fn validate<'life0, 'life1, 'async_trait>( &'life0 self, data: &'life1 HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = ValidationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate both individual fields and the entire request

Implementors§

Source§

impl<T> Validate for T

Auto-implementation of Validate for types that implement both ValidateField and ValidateRequest