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§
Sourcefn application_manifest(&self) -> ApplicationManifestV1
fn application_manifest(&self) -> ApplicationManifestV1
Returns the application-owned V1 contract.
Sourcefn identity(&self, node_id: NodeId) -> RuntimeIdentity
fn identity(&self, node_id: NodeId) -> RuntimeIdentity
Returns the Runtime identity bound to the supplied node.
Sourcefn register_commands(&self, registry: &mut CommandRegistry) -> RuntimeResult<()>
fn register_commands(&self, registry: &mut CommandRegistry) -> RuntimeResult<()>
Declares command names implemented by the plugin.
Sourcefn register_events(&self, registry: &mut EventRegistry) -> RuntimeResult<()>
fn register_events(&self, registry: &mut EventRegistry) -> RuntimeResult<()>
Declares event names emitted by the plugin.
Sourcefn register_states(&self, registry: &mut StateRegistry) -> RuntimeResult<()>
fn register_states(&self, registry: &mut StateRegistry) -> RuntimeResult<()>
Declares state names used by the plugin.
Sourcefn register_decisions(
&self,
registry: &mut DecisionRegistry,
) -> RuntimeResult<()>
fn register_decisions( &self, registry: &mut DecisionRegistry, ) -> RuntimeResult<()>
Registers decision names for catalog/manifest/introspection.
Provided Methods§
Sourcefn register_decision_nodes(
&self,
_engine: &mut DecisionEngine,
) -> RuntimeResult<()>
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.
Sourcefn register_handlers(&self, _bus: &mut CommandBus) -> RuntimeResult<()>
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".