Trait HotReload

Source
pub trait HotReload: Send + Sync {
    // Required methods
    fn check_compatibility<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        current_manifest: &'life1 PluginManifest,
        new_wasm_bytes: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<CompatibilityReport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn hot_reload<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        new_wasm_bytes: &'life1 [u8],
        context: &'life2 ExecutionContext,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn rollback<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        context: &'life1 ExecutionContext,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Hot reload capabilities for plugins

Required Methods§

Source

fn check_compatibility<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, current_manifest: &'life1 PluginManifest, new_wasm_bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<CompatibilityReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check if a new version is compatible for hot reload

Source

fn hot_reload<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, new_wasm_bytes: &'life1 [u8], context: &'life2 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Perform hot reload of the plugin

Source

fn rollback<'life0, 'life1, 'async_trait>( &'life0 mut self, context: &'life1 ExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Rollback to previous version

Implementors§