PluginManagerTrait

Trait PluginManagerTrait 

Source
pub trait PluginManagerTrait: Send + Sync {
    // Required methods
    fn load_plugin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 Path,
    ) -> Pin<Box<dyn Future<Output = Result<PluginId>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn unload_plugin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 PluginId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_plugin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 PluginId,
    ) -> Pin<Box<dyn Future<Output = Result<PluginInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_plugins<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PluginInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn scan<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 PluginId,
        context: ScanContext<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Threat>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn scan_all<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: ScanContext<'life1>,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<PluginId, Vec<Threat>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn reload_plugin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 PluginId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_health<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 PluginId,
    ) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Plugin manager trait

Required Methods§

Source

fn load_plugin<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, ) -> Pin<Box<dyn Future<Output = Result<PluginId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load plugin from file

Source

fn unload_plugin<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 PluginId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Unload a plugin

Source

fn get_plugin<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 PluginId, ) -> Pin<Box<dyn Future<Output = Result<PluginInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get plugin info

Source

fn list_plugins<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<PluginInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all plugins

Source

fn scan<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 PluginId, context: ScanContext<'life2>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Threat>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Scan with specific plugin

Source

fn scan_all<'life0, 'life1, 'async_trait>( &'life0 self, context: ScanContext<'life1>, ) -> Pin<Box<dyn Future<Output = Result<HashMap<PluginId, Vec<Threat>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Scan with all plugins

Source

fn reload_plugin<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 PluginId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reload a plugin

Source

fn get_health<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 PluginId, ) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get plugin health status

Implementors§