pub trait WasmExtensionProvider {
// Required methods
fn supports(&self, abi: WasmAbi) -> bool;
fn start(&self, manifest: &ExtensionManifest) -> Result<(), String>;
fn invoke(
&self,
manifest: &ExtensionManifest,
export: &str,
arguments: &[Value],
) -> Result<Value, String>;
fn cancel(
&self,
manifest: &ExtensionManifest,
request: u64,
) -> Result<(), String>;
fn shutdown(&self, manifest: &ExtensionManifest);
// Provided methods
fn capabilities(&self) -> Vec<String> { ... }
fn release(
&self,
_manifest: &ExtensionManifest,
_handle: &Value,
) -> Result<(), String> { ... }
}Required Methods§
fn supports(&self, abi: WasmAbi) -> bool
fn start(&self, manifest: &ExtensionManifest) -> Result<(), String>
fn invoke( &self, manifest: &ExtensionManifest, export: &str, arguments: &[Value], ) -> Result<Value, String>
fn cancel( &self, manifest: &ExtensionManifest, request: u64, ) -> Result<(), String>
fn shutdown(&self, manifest: &ExtensionManifest)
Provided Methods§
fn capabilities(&self) -> Vec<String>
fn release( &self, _manifest: &ExtensionManifest, _handle: &Value, ) -> Result<(), String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".