pub struct ProducerNodeState {
pub subs: Vec<(NodeId, SubscriptionId)>,
pub op_state: Option<Box<dyn Any + Send + Sync>>,
}Expand description
Per-producer-node state owned by the ProducerBinding impl.
Holds upstream Subscriptions (auto-dropped on producer
deactivation) plus an optional Box<dyn Any> slot for op-specific
state shared across the build closure and its sink closures.
(Most ops capture state via Arc<Mutex<...>> directly in closure
captures; the op_state slot is reserved for ops that prefer
trait-object storage.)
Fields§
§subs: Vec<(NodeId, SubscriptionId)>Recorded upstream (source_node, sub_id) pairs taken by
ProducerCtx::subscribe_to. S2b/D229: core-level RAII
Subscription is retired — these are explicitly unsubscribed by
the binding’s BindingBoundary::producer_deactivate impl via
the owner-supplied unsub closure (see
default_producer_deactivate), behaviour-identical to the old
Vec<Subscription>-drop cascade.
op_state: Option<Box<dyn Any + Send + Sync>>Optional op-specific scratch (rarely used; most ops capture state via closure).