ValidationService

Trait ValidationService 

Source
pub trait ValidationService: Send + Sync {
    // Required methods
    fn register_rule(&mut self, rule: Box<dyn ValidationRule>);
    fn validate_config<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 Config,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn validate_credentials<'life0, 'life1, 'async_trait>(
        &'life0 self,
        credentials: &'life1 Credentials,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_validation_summary<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        config: &'life1 Config,
        credentials: Option<&'life2 Credentials>,
    ) -> Pin<Box<dyn Future<Output = Result<ValidationSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn auto_fix<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 mut Config,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Validation service

Required Methods§

Source

fn register_rule(&mut self, rule: Box<dyn ValidationRule>)

Register validation rule

Source

fn validate_config<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 Config, ) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate complete configuration

Source

fn validate_credentials<'life0, 'life1, 'async_trait>( &'life0 self, credentials: &'life1 Credentials, ) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate credentials

Source

fn get_validation_summary<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, config: &'life1 Config, credentials: Option<&'life2 Credentials>, ) -> Pin<Box<dyn Future<Output = Result<ValidationSummary>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get validation summary

Source

fn auto_fix<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 mut Config, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fix auto-fixable issues

Implementors§