pub trait PluginExecutor: Send + Sync {
// Required methods
fn info(&self) -> &PluginInfo;
fn method_count(&self) -> u32;
fn call_raw(
&self,
method: usize,
input: &[u8],
) -> Result<Vec<u8>, CallError>;
}Expand description
The surface every execution backend shares.
Implementations must be Send + Sync: methods take &self, so a handle can
be shared across threads as long as the backend is internally thread-safe.
Required Methods§
Sourcefn info(&self) -> &PluginInfo
fn info(&self) -> &PluginInfo
Owned metadata describing the loaded plugin.
Sourcefn method_count(&self) -> u32
fn method_count(&self) -> u32
Number of methods the plugin exposes, in interface (vtable) order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".