pub trait PluginHost {
// Required methods
fn verify_manifest(
&self,
manifest: &PluginManifest,
) -> Result<(), PluginError>;
fn exchange(
&mut self,
manifest: &PluginManifest,
request: &PluginRequest,
) -> Result<PluginResponse, PluginError>;
// Provided method
fn call(
&mut self,
manifest: &PluginManifest,
request: &PluginRequest,
) -> Result<PluginResponse, PluginError> { ... }
}Required Methods§
fn verify_manifest(&self, manifest: &PluginManifest) -> Result<(), PluginError>
fn exchange( &mut self, manifest: &PluginManifest, request: &PluginRequest, ) -> Result<PluginResponse, PluginError>
Provided Methods§
fn call( &mut self, manifest: &PluginManifest, request: &PluginRequest, ) -> Result<PluginResponse, PluginError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".