Skip to main content

ValidateArgs

Trait ValidateArgs 

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

    // Required method
    fn validate_with_args(
        &self,
        args: Self::Args,
    ) -> Result<(), ValidationErrors>;
}
Expand description

This trait will be implemented by deriving Validate. This implementation can take one argument and pass this on to custom validators. The default Args type will be () if there is no custom validation with defined arguments.

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

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is 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>,

Implementors§