Skip to main content

PluginRuntime

Trait PluginRuntime 

Source
pub trait PluginRuntime: Send + Sync {
    // Required methods
    fn plugin_busy(&self, id: &str) -> bool;
    fn unload_plugin<'a>(
        &'a self,
        id: &'a str,
        cancel: &'a CancellationToken,
    ) -> BoxFuture<'a, bool>;
    fn plugin_registered(&self, id: &str) -> bool;
}
Expand description

What the plugin host tells a sync (Go PluginRuntime and PluginLoadInspector).

Required Methods§

Source

fn plugin_busy(&self, id: &str) -> bool

Loaded or still loading.

Source

fn unload_plugin<'a>( &'a self, id: &'a str, cancel: &'a CancellationToken, ) -> BoxFuture<'a, bool>

Detaches and closes the plugin; false when nothing was unloaded. Cancelling cancel stops waiting for it (Go UnloadPluginContext).

Source

fn plugin_registered(&self, id: &str) -> bool

Active in the current snapshot.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§