Skip to main content

GraphObserveAllReactive

Struct GraphObserveAllReactive 

Source
pub struct GraphObserveAllReactive { /* private fields */ }
Expand description

Reactive observe_all — auto-subscribes late-added named nodes via the owner-side namespace-change listener, and prunes torn-down nodes via the Core topology sub (the prune unsubscribe is MailboxOp::Defer’d since NodeTornDown fires in-wave — D246 r6). D246 rule 3: no RAII Drop; teardown is the owner-invoked Self::detach(core) — owner-invoked, REQUIRED. The ns-sink is collected by graph.destroy(core); the Core topology sub + fan-out subs are opened via raw core.subscribe* and are NOT OwnedCore-tracked, so detach(core) is the only thing that collects them (dropping the handle without it leaks them).

Implementations§

Source§

impl GraphObserveAllReactive

Source

pub fn subscribe<F>(&mut self, core: &Core, sink: F) -> usize
where F: Fn(&str, &[Message]) + 'static,

Subscribe a sink to all current AND future named nodes.

§Panics

Panics if called more than once on the same handle (single-shot wiring; rebuild via observe_all_reactive).

Source

pub fn detach(&mut self, core: &Core)

Owner-invoked, synchronous teardown (D246 rule 3 — replaces the retired RAII Drop; eliminates the Blind #4 deadlock class). Topology sub first, then namespace sink, then drain the fan-out subs into a local Vec and release the inner lock BEFORE the core.unsubscribe cascade (Core::unsubscribe runs the full deactivation chain and can fire sinks synchronously; holding inner across it would self-deadlock — the pre-β invariant, preserved).

Source

pub fn graph(&self) -> &Graph

The backing graph handle.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.