pub trait ValidationRule: Send + Sync {
// Required methods
fn rule_id(&self) -> &str;
fn description(&self) -> &str;
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;
// Provided method
fn applies_to(&self, _config: &Config) -> bool { ... }
}Expand description
Individual validation rule
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get rule description
Sourcefn 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_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 configuration
Sourcefn 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 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
Provided Methods§
Sourcefn applies_to(&self, _config: &Config) -> bool
fn applies_to(&self, _config: &Config) -> bool
Check if rule applies to config