pub struct InlineRegistry { /* private fields */ }Expand description
A pluggable registry of inline (Rust function pointer) stage implementations.
The Noether stdlib stages are registered automatically via the internal
find_implementation match table. Downstream crates that want to ship their
own Pure Rust stages — without modifying noether-core — can build an
InlineRegistry, call register for each of their stages, and pass it to
InlineExecutor::from_store_with_registry or
crate::executor::composite::CompositeExecutor::from_store_with_registry.
§Example
use noether_engine::executor::InlineRegistry;
let mut registry = InlineRegistry::new();
registry.register("Evaluate a sprint DAG from events", my_dag_eval_fn);
registry.register("Check agent health from heartbeat", my_health_check_fn);
let executor = CompositeExecutor::from_store_with_registry(&store, registry);Implementations§
Source§impl InlineRegistry
impl InlineRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Create an empty registry. The Noether stdlib is always available regardless — it is built into the binary via the static match table.
Sourcepub fn register(
&mut self,
description: impl Into<String>,
f: StageFn,
) -> &mut Self
pub fn register( &mut self, description: impl Into<String>, f: StageFn, ) -> &mut Self
Register a stage implementation keyed by its description string
(the same string used in the stage spec and noether stage search).
If the same description is registered twice the later call wins.
Returns &mut Self for chaining.