pub trait Validator:
Any
+ Send
+ Sync {
// Required methods
fn validate(&self, value: &Value) -> ValidationResult;
fn as_any(&self) -> &dyn Any;
// Provided method
fn validate_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_db: &'life1 Arc<Database>,
value: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ValidationResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}