pub trait SecurityPlugin: Send + Sync {
// Required methods
fn metadata(&self) -> PluginMetadata;
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn scan<'life0, 'life1, 'async_trait>(
&'life0 self,
context: ScanContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Threat>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn update_config<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_metrics(&self) -> PluginMetrics { ... }
}Expand description
Security plugin trait
Required Methods§
Sourcefn metadata(&self) -> PluginMetadata
fn metadata(&self) -> PluginMetadata
Get plugin metadata
Sourcefn initialize<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize plugin with configuration
Sourcefn scan<'life0, 'life1, 'async_trait>(
&'life0 self,
context: ScanContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Threat>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn scan<'life0, 'life1, 'async_trait>(
&'life0 self,
context: ScanContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Threat>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Scan data for threats
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform health check
Provided Methods§
Sourcefn update_config<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_config<'life0, 'async_trait>(
&'life0 mut self,
config: Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update plugin configuration
Sourcefn get_metrics(&self) -> PluginMetrics
fn get_metrics(&self) -> PluginMetrics
Get current metrics
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".