Trait Plugin

Source
pub trait Plugin: Send + Sync {
    // Provided methods
    fn activate<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginActivationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn deactivate<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginDeactivationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Provided Methods§

Source

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

Called on initialization of the plugin.

Source

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

Called on deactivation of the plugin.

Trait Implementations§

Source§

impl Injectable for dyn Plugin + Sync + Send

Implementors§