Trait Plugin

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn id(&self) -> String;
    fn on_start<'life0, 'async_trait>(
        &'life0 self,
        sdk: Weak<LiquidSdk>,
        storage: PluginStorage,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn on_stop<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn id(&self) -> String

Source

fn on_start<'life0, 'async_trait>( &'life0 self, sdk: Weak<LiquidSdk>, storage: PluginStorage, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Implementors§