pub trait PluginLoader {
    // Required method
    fn load(&self) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>>>>;
}
Expand description

A trait for loading plugin module data asynchronously.

This trait defines the behavior for loading plugin module data asynchronously. Implementors of this trait provide the ability to asynchronously retrieve the Wasm module data for a plugin.

Required Methods§

source

fn load(&self) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>>>>

Asynchronously loads the Wasm module data for the plugin.

This method returns a Future that produces a Result containing the Wasm module data as a Vec<u8> on success, or an anyhow::Error if loading encounters issues.

Returns

Returns a Pin<Box<dyn Future<Output = Result<Vec<u8>, anyhow::Error>>>> representing the asynchronous loading process.

Implementors§