pub trait NativePluginFactory: Debug + 'static {
// Required methods
fn package_id(&self) -> &'static str;
fn instantiate(
&self,
context: NativePluginFactoryContext<'_>,
) -> Result<NativePluginInstance, RuntimeFailure>;
// Provided methods
fn package_version(&self) -> &'static str { ... }
fn factory_identity(&self) -> String { ... }
}Expand description
Adapter-specific factory for a statically linked native Rust Plugin.
Required Methods§
Sourcefn package_id(&self) -> &'static str
fn package_id(&self) -> &'static str
Package identity selected by the Resolved App Plan.
Sourcefn instantiate(
&self,
context: NativePluginFactoryContext<'_>,
) -> Result<NativePluginInstance, RuntimeFailure>
fn instantiate( &self, context: NativePluginFactoryContext<'_>, ) -> Result<NativePluginInstance, RuntimeFailure>
Creates a fresh Plugin Instance generation.
Provided Methods§
Sourcefn package_version(&self) -> &'static str
fn package_version(&self) -> &'static str
Exact statically linked Cargo package version.
Sourcefn factory_identity(&self) -> String
fn factory_identity(&self) -> String
Immutable factory identity advertised by the exact Host Build Manifest.
Plugin-resolved Plans carry this value as their package revision. The default keeps ordinary statically linked factories unique by package and version while allowing a factory to override the identity when its build authority is more specific than a Cargo package version.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".