pub struct DiagnosticsBus { /* private fields */ }Expand description
The actor’s send-side diagnostics bus. One per actor; shared across read-loop, supervisor, future telemetry hooks.
Implementations§
Source§impl DiagnosticsBus
impl DiagnosticsBus
pub fn new() -> Self
Sourcepub fn subscribe(&self) -> Receiver<DiagnosticEvent>
pub fn subscribe(&self) -> Receiver<DiagnosticEvent>
Subscribe to this bus. Returns a Receiver that yields
every event published after the call. Late subscribers
don’t see older events.
Sourcepub fn publish(&self, ev: DiagnosticEvent)
pub fn publish(&self, ev: DiagnosticEvent)
Publish an event to all subscribers. Drops silently if no subscriber is listening (broadcast::send returns Err in that case; we don’t surface it – “no listener” is a supported state, not an error).
Sourcepub fn receiver_count(&self) -> usize
pub fn receiver_count(&self) -> usize
Approximate count of active subscribers. Useful for telemetry / debug output; not load-bearing.
Trait Implementations§
Source§impl Clone for DiagnosticsBus
impl Clone for DiagnosticsBus
Source§fn clone(&self) -> DiagnosticsBus
fn clone(&self) -> DiagnosticsBus
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 moreSource§impl Debug for DiagnosticsBus
impl Debug for DiagnosticsBus
Auto Trait Implementations§
impl Freeze for DiagnosticsBus
impl RefUnwindSafe for DiagnosticsBus
impl Send for DiagnosticsBus
impl Sync for DiagnosticsBus
impl Unpin for DiagnosticsBus
impl UnsafeUnpin for DiagnosticsBus
impl UnwindSafe for DiagnosticsBus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more