Skip to main content

PluginLoader

Trait PluginLoader 

Source
pub trait PluginLoader: Send + Sync {
    // Required methods
    fn load(&self, req: LoadRequest) -> Result<PluginId, PluginLoadError>;
    fn unload(&self, id: PluginId);
}
Expand description

Loader surface. Implementations are wired in a follow-up change.

Required Methods§

Source

fn load(&self, req: LoadRequest) -> Result<PluginId, PluginLoadError>

Load (and instantiate) a plugin according to req. Returns a stable PluginId the dispatcher uses for subsequent invokes.

Source

fn unload(&self, id: PluginId)

Shut down a previously-loaded plugin. Idempotent.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§