pub struct NodeRegistration {
pub deps: Vec<NodeId>,
pub fn_or_op: Option<NodeFnOrOp>,
pub opts: NodeOpts,
}Expand description
Unified node-registration descriptor (D030, Slice D).
All node kinds (State / Producer / Derived / Dynamic / Operator)
register through Core::register with a NodeRegistration. The
kind is derived from the field shape of the registration —
(deps.is_empty(), fn_or_op variant):
| deps | fn_or_op | is_dynamic | resulting kind |
|---|---|---|---|
| empty | None | - | State |
| empty | Some(Fn) | - | Producer |
| non-empty | Some(Fn) | false | Derived |
| non-empty | Some(Fn) | true | Dynamic |
| non-empty | Some(Op) | - | Operator |
The sugar wrappers (Core::register_state, Core::register_producer,
etc.) build a NodeRegistration and delegate.
Fields§
§deps: Vec<NodeId>Upstream deps in declaration order. Empty for state / producer.
fn_or_op: Option<NodeFnOrOp>Closure-form fn id or typed-op discriminant. None for state /
passthrough.
opts: NodeOptsCross-kind config knobs.
Trait Implementations§
Source§impl Clone for NodeRegistration
impl Clone for NodeRegistration
Source§fn clone(&self) -> NodeRegistration
fn clone(&self) -> NodeRegistration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NodeRegistration
impl RefUnwindSafe for NodeRegistration
impl Send for NodeRegistration
impl Sync for NodeRegistration
impl Unpin for NodeRegistration
impl UnsafeUnpin for NodeRegistration
impl UnwindSafe for NodeRegistration
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
Mutably borrows from an owned value. Read more