Skip to main content

NodeRegistry

Struct NodeRegistry 

Source
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

Source

pub fn empty() -> Self

Empty registry — no node types known.

Source

pub fn with_builtins() -> Self

Registry pre-loaded with the generic (non-business) node types.

Source

pub fn register_step( &mut self, node_type: impl Into<String>, factory: StepFactory, )

Register a step-node factory under node_type.

Source

pub fn register_ingress(&mut self, node_type: impl Into<String>)

Mark a node type as an ingress source.

Source

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

Source

pub fn is_fan_out_capable(&self, node_type: &str) -> bool

Whether the node type may return FanOut.

Source

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.

Source

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.

Source

pub fn guard_kind(&self, node_type: &str) -> Option<GuardKind>

Guard role of a node type, if registered as a guard.

Source

pub fn is_side_effect_guard(&self, node_type: &str) -> bool

Whether the node type is a registered guard.

Source

pub fn is_ingress(&self, node_type: &str) -> bool

Whether the node type is an ingress source.

Source

pub fn is_step(&self, node_type: &str) -> bool

Whether the node type can be compiled as a step.

Source

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.

Source

pub fn known_step_types(&self) -> impl Iterator<Item = &str>

Registered step node types.

Source

pub fn register_schema( &mut self, node_type: impl Into<String>, schema: NodeSchema, )

Attach a config schema to a node type.

Source

pub fn schema(&self, node_type: &str) -> Option<&NodeSchema>

Config schema of a node type.

Source

pub fn register_capability( &mut self, manifest: CapabilityManifest, ) -> Result<(), NodeError>

Register the immutable contract for a trigger, expression, guard or action.

Source

pub fn capability(&self, id: &str) -> Option<&CapabilityManifest>

Registered manifest by capability id.

Source

pub fn capability_manifests(&self) -> impl Iterator<Item = &CapabilityManifest>

Every registered manifest.

Trait Implementations§

Source§

impl Debug for NodeRegistry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more