[][src]Trait form_validation::AsyncValidatable

pub trait AsyncValidatable<Key> where
    Key: 'static, 
{ fn validate_future(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<(), ValidationErrors<Key>>>>>; fn validate_future_or_empty(
        &self
    ) -> Pin<Box<dyn Future<Output = ValidationErrors<Key>>>> { ... } }
This is supported on feature="async" only.

An item that can be validated asynchronously.

See Validatable for the synchronous version.

Required methods

fn validate_future(
    &self
) -> Pin<Box<dyn Future<Output = Result<(), ValidationErrors<Key>>>>>

This is supported on feature="async" only.

Creates a future that will validate this item. The future returns Ok(()) if no errors were encountered, and returns Err(ValidationErrors) if any errors were encountered.

Loading content...

Provided methods

fn validate_future_or_empty(
    &self
) -> Pin<Box<dyn Future<Output = ValidationErrors<Key>>>>

This is supported on feature="async" only.

Creates a future that will validate this item. The future returns an empty ValidationErrors if no errors were encountered during validation.

Loading content...

Implementors

Loading content...