ConfigValidator

Trait ConfigValidator 

Source
pub trait ConfigValidator: Send + Sync {
    // Required methods
    fn validate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 Config,
    ) -> Pin<Box<dyn Future<Output = SentinelResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

Configuration validator trait

Required Methods§

Source

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

Validate configuration before applying

Source

fn name(&self) -> &str

Validator name for logging

Implementors§