pub struct OwnedCore { /* private fields */ }Expand description
Owns a Core, tracks the subscriptions opened through it, and
tears them down on the owner thread in Drop. Construct with
OwnedCore::new (fresh Core) or OwnedCore::with_core (adopt
a Core the caller already built).
Implementations§
Source§impl OwnedCore
impl OwnedCore
Sourcepub fn new(binding: Arc<dyn BindingBoundary>) -> Self
pub fn new(binding: Arc<dyn BindingBoundary>) -> Self
Build a fresh Core wired to binding and own it.
Sourcepub fn core(&self) -> &Core
pub fn core(&self) -> &Core
Borrow the owned dispatcher. This is the D231 owner-side &Core
— pass it explicitly into every Core-touching op (graph,
structures, storage, producer build). Never store or clone it.
Sourcepub fn binding(&self) -> Arc<dyn BindingBoundary> ⓘ
pub fn binding(&self) -> Arc<dyn BindingBoundary> ⓘ
The binding this Core was wired with.
Sourcepub fn track_subscribe(&self, node_id: NodeId, sink: Sink) -> SubscriptionId
pub fn track_subscribe(&self, node_id: NodeId, sink: Sink) -> SubscriptionId
Subscribe a sink and track it for owner-thread teardown on drop.
Returns the SubscriptionId for an explicit early
Self::unsubscribe (D246 rule 3 — owner-invoked, synchronous;
no RAII below the binding).
Sourcepub fn track_subscribe_topology(
&self,
sink: TopologySink,
) -> TopologySubscriptionId
pub fn track_subscribe_topology( &self, sink: TopologySink, ) -> TopologySubscriptionId
Subscribe a topology sink and track it for teardown on drop.
Sourcepub fn unsubscribe(&self, node_id: NodeId, sub_id: SubscriptionId)
pub fn unsubscribe(&self, node_id: NodeId, sub_id: SubscriptionId)
Explicit early unsubscribe (owner-invoked, synchronous — D225/
D241). Idempotent: a later Drop won’t double-unsubscribe a
detached id (and core unsubscribe is itself idempotent on
monotonic never-recycled ids).
Sourcepub fn unsubscribe_topology(&self, id: TopologySubscriptionId)
pub fn unsubscribe_topology(&self, id: TopologySubscriptionId)
Explicit early topology unsubscribe (owner-invoked, synchronous).