pub enum NodeKind {
State,
Producer,
Derived,
Dynamic,
Operator(OperatorOp),
}Expand description
Node kind discriminant — derived metadata computed from
[NodeRecord]’s field shape (D030 unification, Slice D).
Core no longer stores kind as a field; it’s computed on demand from
(deps.is_empty(), fn_id.is_some(), op.is_some(), is_dynamic),
mirroring TS’s data model where NodeImpl has no _kind field. The
shape uniquely identifies the kind:
| deps | fn_id | op | is_dynamic | kind |
|---|---|---|---|---|
| empty | None | None | - | State |
| empty | Some | None | - | Producer |
| non-empty | Some | None | false | Derived |
| non-empty | Some | None | true | Dynamic |
| non-empty | None | Some | - | Operator |
Public API (Core::kind_of) derives this enum on each call. State
nodes are ROM (cache survives deactivation); compute nodes
(Derived / Dynamic / Operator) and producers are RAM.
Variants§
State
Source node: cache is intrinsic, no fn, no deps. Mutated via Core::emit.
Producer
Producer node: fn fires once on first subscribe. No deps; emissions arrive via sinks the fn subscribes to (zip / concat / race / takeUntil pattern). Slice D / D031.
Derived
Derived node: fn fires on every dep change; all deps tracked.
Dynamic
Dynamic node: fn declares which dep indices it actually read this run. Untracked dep updates flow through cache but do NOT re-fire fn.
Operator(OperatorOp)
Operator node: built-in dispatch path for transform / combine /
flow / resilience operators. The OperatorOp discriminant selects
the per-operator FFI path (BindingBoundary::project_each etc.);
Core manages per-operator state via the generic op_scratch slot
on NodeRecord (D026). Per Slice C-1 (D009) / Slice C-3 (D026).
Trait Implementations§
impl Copy for NodeKind
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.