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§
Sourcefn validate(
&self,
) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>>where
Self: Sync,
fn validate(
&self,
) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>>where
Self: Sync,
Validate schema using all validators.
Sourcefn validate_sync(&self) -> Result<(), ValidationErrors<Self::Error>>
fn validate_sync(&self) -> Result<(), ValidationErrors<Self::Error>>
Validate schema using only synchronous validators.
Sourcefn validate_async(
&self,
) -> Pin<Box<impl Future<Output = Result<(), ValidationErrors<Self::Error>>> + Send>>
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.