Skip to main content

AppPlugin

Trait AppPlugin 

Source
pub trait AppPlugin: Send + Sync {
    // Required methods
    fn application_manifest(&self) -> ApplicationManifestV1;
    fn identity(&self, node_id: NodeId) -> RuntimeIdentity;
    fn register_commands(
        &self,
        registry: &mut CommandRegistry,
    ) -> RuntimeResult<()>;
    fn register_events(&self, registry: &mut EventRegistry) -> RuntimeResult<()>;
    fn register_states(&self, registry: &mut StateRegistry) -> RuntimeResult<()>;
    fn register_decisions(
        &self,
        registry: &mut DecisionRegistry,
    ) -> RuntimeResult<()>;

    // Provided methods
    fn register_decision_nodes(
        &self,
        _engine: &mut DecisionEngine,
    ) -> RuntimeResult<()> { ... }
    fn register_handlers(&self, _bus: &mut CommandBus) -> RuntimeResult<()> { ... }
}
Expand description

Runtime-facing application plugin contract.

Required Methods§

Source

fn application_manifest(&self) -> ApplicationManifestV1

Returns the application-owned V1 contract.

Source

fn identity(&self, node_id: NodeId) -> RuntimeIdentity

Returns the Runtime identity bound to the supplied node.

Source

fn register_commands(&self, registry: &mut CommandRegistry) -> RuntimeResult<()>

Declares command names implemented by the plugin.

Source

fn register_events(&self, registry: &mut EventRegistry) -> RuntimeResult<()>

Declares event names emitted by the plugin.

Source

fn register_states(&self, registry: &mut StateRegistry) -> RuntimeResult<()>

Declares state names used by the plugin.

Source

fn register_decisions( &self, registry: &mut DecisionRegistry, ) -> RuntimeResult<()>

Registers decision names for catalog/manifest/introspection.

Provided Methods§

Source

fn register_decision_nodes( &self, _engine: &mut DecisionEngine, ) -> RuntimeResult<()>

Registers executable decision nodes used at dispatch time. RuntimeBuilder keeps registry aligned with engine names after this step.

Source

fn register_handlers(&self, _bus: &mut CommandBus) -> RuntimeResult<()>

Registers executable command handlers.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§