Skip to main content

CoreFull

Trait CoreFull 

Source
pub trait CoreFull {
Show 21 methods // Required methods fn register_state( &self, initial: HandleId, partial: bool, ) -> Result<NodeId, RegisterError>; fn register_producer(&self, fn_id: FnId) -> Result<NodeId, RegisterError>; fn subscribe(&self, node_id: NodeId, sink: Sink) -> SubscriptionId; fn try_subscribe( &self, node_id: NodeId, sink: Sink, ) -> Result<SubscriptionId, SubscribeError>; fn unsubscribe(&self, node_id: NodeId, sub_id: SubscriptionId); fn emit(&self, node_id: NodeId, handle: HandleId); fn complete(&self, node_id: NodeId); fn error(&self, node_id: NodeId, handle: HandleId); fn teardown(&self, node_id: NodeId); fn invalidate(&self, node_id: NodeId); fn cache_of(&self, node_id: NodeId) -> HandleId; fn has_fired_once(&self, node_id: NodeId) -> bool; fn kind_of(&self, node_id: NodeId) -> Option<NodeKind>; fn deps_of(&self, node_id: NodeId) -> Vec<NodeId>; fn is_terminal(&self, node_id: NodeId) -> Option<TerminalKind>; fn is_dirty(&self, node_id: NodeId) -> bool; fn sink_count_of(&self, node_id: NodeId) -> usize; fn serialize_handle(&self, handle: HandleId) -> Option<Value>; fn mailbox(&self) -> Arc<CoreMailbox>; fn defer_queue(&self) -> Rc<DeferQueue>; fn binding(&self) -> Arc<dyn BindingBoundary>;
}
Expand description

Object-safe full-Core re-entry surface (S2b / D233) — the methods a producer sink’s owner-side crate::mailbox::MailboxOp::Defer closure needs, by NodeId/HandleId/Sink/id only (no C/T), blanket-impl’d for every Core. Lets windowing / higher-order-operator sinks perform value-returning topology mutation (register_*/subscribe) in-wave without naming the cell type: the BatchGuard drain-to-quiescence loop calls f(self as &dyn CoreFull) while it holds the owner &Core.

Required Methods§

Source

fn register_state( &self, initial: HandleId, partial: bool, ) -> Result<NodeId, RegisterError>

Source

fn register_producer(&self, fn_id: FnId) -> Result<NodeId, RegisterError>

Source

fn subscribe(&self, node_id: NodeId, sink: Sink) -> SubscriptionId

Source

fn try_subscribe( &self, node_id: NodeId, sink: Sink, ) -> Result<SubscriptionId, SubscribeError>

Source

fn unsubscribe(&self, node_id: NodeId, sub_id: SubscriptionId)

Source

fn emit(&self, node_id: NodeId, handle: HandleId)

Source

fn complete(&self, node_id: NodeId)

Source

fn error(&self, node_id: NodeId, handle: HandleId)

Source

fn teardown(&self, node_id: NodeId)

See Core::teardown. Sink-side terminal forwards (e.g. stratify TEARDOWN passthrough) route through em.defer — rare, so Defer rather than a 5th MailboxOp fast-path variant.

Source

fn invalidate(&self, node_id: NodeId)

See Core::invalidate. Sink-side INVALIDATE forwards (higher-order build_inner_sink) route through em.defer.

Source

fn cache_of(&self, node_id: NodeId) -> HandleId

Source

fn has_fired_once(&self, node_id: NodeId) -> bool

Source

fn kind_of(&self, node_id: NodeId) -> Option<NodeKind>

Source

fn deps_of(&self, node_id: NodeId) -> Vec<NodeId>

Source

fn is_terminal(&self, node_id: NodeId) -> Option<TerminalKind>

Source

fn is_dirty(&self, node_id: NodeId) -> bool

Source

fn sink_count_of(&self, node_id: NodeId) -> usize

Subscriber count for node_id — number of live external sinks (NOT counting downstream node-fn fan-out, which is tracked internally via consumers). Used by graphrefly_graph::resource_profile (R3.6.3 / D285 / D286) to compute per-node subscriberCount and the hotspots.bySubscriberCount ranking without needing a separate substrate widening. Returns 0 for unknown / torn-down nodes (consistent with the other *_of accessors’ “unknown ⇒ default” stance). Pure read; no C/T surfaced.

Source

fn serialize_handle(&self, handle: HandleId) -> Option<Value>

Serialize a node’s cached HandleId via the binding (S2b/β D244). Delegates to binding_ptr().serialize_handle — needed so an in-wave MailboxOp::Defer closure (storage snapshot-on- observe) can run graphrefly_graph snapshot through &dyn CoreFull. Pure binding-delegating read; no C/T surfaced.

Source

fn mailbox(&self) -> Arc<CoreMailbox>

The wave-drained [CoreMailbox] (D246 rule 5: the one facade is mutation + inspection + serialize + mailbox). Lets a holder of &dyn CoreFull post deferred ops without naming the cell type — folds D245’s per-binding “how do I reach the mailbox”.

Source

fn defer_queue(&self) -> Rc<DeferQueue>

The owner-side crate::mailbox::DeferQueue (D249/S2c — the !Send Defer split off CoreMailbox). Lets a holder of &dyn CoreFull post owner-side deferred closures (ProducerCtx build path) without naming the cell type.

Source

fn binding(&self) -> Arc<dyn BindingBoundary>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§