Skip to main content

Validate

Trait Validate 

Source
pub trait Validate: Send + Sized {
    // Required method
    fn validate<DB: DatabaseConnection + ContentActions<D> + Sync, D: Document + Sync>(
        &self,
        ctx: ValidationContext<'_, DB, D>,
    ) -> impl Future<Output = Result<(), ValidationError>> + Send + Sized;
}

Required Methods§

Source

fn validate<DB: DatabaseConnection + ContentActions<D> + Sync, D: Document + Sync>( &self, ctx: ValidationContext<'_, DB, D>, ) -> impl Future<Output = Result<(), ValidationError>> + Send + Sized

Validates the thing.

§Errors

This function will return an error if validation fails.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Validate + Sync> Validate for Option<T>

Implementors§