Skip to main content

ValidateArgs

Trait ValidateArgs 

Source
pub trait ValidateArgs<'v_a>: Send {
    type Args;

    // Required method
    fn validate_with_args(
        &self,
        args: &mut Self::Args,
    ) -> impl Future<Output = Result<(), ValidationErrors>> + Send;
}
Expand description

The Args type can use the lifetime 'v_a to pass references onto the validator.

Required Associated Types§

Required Methods§

Source

fn validate_with_args( &self, args: &mut Self::Args, ) -> impl Future<Output = Result<(), ValidationErrors>> + Send

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<'v_a, T, U> ValidateArgs<'v_a> for Option<T>
where T: ValidateArgs<'v_a, Args = U> + Sync, U: Send,

Source§

type Args = U

Source§

async fn validate_with_args( &self, args: &mut Self::Args, ) -> Result<(), ValidationErrors>

Implementors§