Validate

Trait Validate 

Source
pub trait Validate: ValidateWithContext<Context = ()> {
    // Provided methods
    fn validate(
        &self,
    ) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>>
       where Self: Sync { ... }
    fn validate_sync(&self) -> Result<(), ValidationErrors<Self::Error>> { ... }
    fn validate_async(
        &self,
    ) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>> { ... }
}
Expand description

Validate a schema.

Provided Methods§

Source

fn validate( &self, ) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>>
where Self: Sync,

Validate schema using all validators.

Source

fn validate_sync(&self) -> Result<(), ValidationErrors<Self::Error>>

Validate schema using only synchronous validators.

Source

fn validate_async( &self, ) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>>

Validate schema using only asynchronous validators.

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§