Skip to main content

NativePluginFactory

Trait NativePluginFactory 

Source
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 runtime_profile(&self) -> &'static str { ... }
    fn factory_identity(&self) -> String { ... }
}
Expand description

Adapter-specific factory for a statically linked native Rust Plugin.

Required Methods§

Source

fn package_id(&self) -> &'static str

Package identity selected by the Resolved App Plan.

Source

fn instantiate( &self, context: NativePluginFactoryContext<'_>, ) -> Result<NativePluginInstance, RuntimeFailure>

Creates a fresh Plugin Instance generation.

Provided Methods§

Source

fn package_version(&self) -> &'static str

Exact statically linked Cargo package version.

Source

fn runtime_profile(&self) -> &'static str

Exact native authoring protocol implemented by this factory.

The resolved Plan runtime profile belongs to the selected execution Adapter and is validated by the control plane before this registry runs.

Source

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".

Implementors§