pub struct NodeRegistry { /* private fields */ }Expand description
Registry of step-node factories. Ingress types are tracked by name only — the runner owns their execution.
Implementations§
Source§impl NodeRegistry
impl NodeRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Registry pre-loaded with the generic (non-business) node types.
Sourcepub fn register_step(
&mut self,
node_type: impl Into<String>,
factory: StepFactory,
)
pub fn register_step( &mut self, node_type: impl Into<String>, factory: StepFactory, )
Register a step-node factory under node_type.
Sourcepub fn register_ingress(&mut self, node_type: impl Into<String>)
pub fn register_ingress(&mut self, node_type: impl Into<String>)
Mark a node type as an ingress source.
Sourcepub fn register_fan_out(&mut self, node_type: impl Into<String>)
pub fn register_fan_out(&mut self, node_type: impl Into<String>)
Mark a node type as fan-out-capable (its process may return FanOut).
The validator (R4’) bans these upstream of execute.*.
Sourcepub fn is_fan_out_capable(&self, node_type: &str) -> bool
pub fn is_fan_out_capable(&self, node_type: &str) -> bool
Whether the node type may return FanOut.
Sourcepub fn register_side_effect_guard(&mut self, node_type: impl Into<String>)
pub fn register_side_effect_guard(&mut self, node_type: impl Into<String>)
Declare a product node as an authorization guard for execute.* side effects.
Sourcepub fn register_guard(&mut self, node_type: impl Into<String>, kind: GuardKind)
pub fn register_guard(&mut self, node_type: impl Into<String>, kind: GuardKind)
Declare the role a guard plays on an action’s dominating path.
Sourcepub fn guard_kind(&self, node_type: &str) -> Option<GuardKind>
pub fn guard_kind(&self, node_type: &str) -> Option<GuardKind>
Guard role of a node type, if registered as a guard.
Sourcepub fn is_side_effect_guard(&self, node_type: &str) -> bool
pub fn is_side_effect_guard(&self, node_type: &str) -> bool
Whether the node type is a registered guard.
Sourcepub fn is_ingress(&self, node_type: &str) -> bool
pub fn is_ingress(&self, node_type: &str) -> bool
Whether the node type is an ingress source.
Sourcepub fn is_step(&self, node_type: &str) -> bool
pub fn is_step(&self, node_type: &str) -> bool
Whether the node type can be compiled as a step.
Sourcepub fn build_step(
&self,
node_type: &str,
config: &Value,
) -> Result<Box<dyn StepNode>, NodeError>
pub fn build_step( &self, node_type: &str, config: &Value, ) -> Result<Box<dyn StepNode>, NodeError>
Build a step node instance from a spec node’s type + config.
Sourcepub fn known_step_types(&self) -> impl Iterator<Item = &str>
pub fn known_step_types(&self) -> impl Iterator<Item = &str>
Registered step node types.
Sourcepub fn register_schema(
&mut self,
node_type: impl Into<String>,
schema: NodeSchema,
)
pub fn register_schema( &mut self, node_type: impl Into<String>, schema: NodeSchema, )
Attach a config schema to a node type.
Sourcepub fn schema(&self, node_type: &str) -> Option<&NodeSchema>
pub fn schema(&self, node_type: &str) -> Option<&NodeSchema>
Config schema of a node type.
Sourcepub fn register_capability(
&mut self,
manifest: CapabilityManifest,
) -> Result<(), NodeError>
pub fn register_capability( &mut self, manifest: CapabilityManifest, ) -> Result<(), NodeError>
Register the immutable contract for a trigger, expression, guard or action.
Sourcepub fn capability(&self, id: &str) -> Option<&CapabilityManifest>
pub fn capability(&self, id: &str) -> Option<&CapabilityManifest>
Registered manifest by capability id.
Sourcepub fn capability_manifests(&self) -> impl Iterator<Item = &CapabilityManifest>
pub fn capability_manifests(&self) -> impl Iterator<Item = &CapabilityManifest>
Every registered manifest.