pub struct BroadcastStats { /* private fields */ }Expand description
A per-broadcast, tier-scoped handle. Cheap to clone.
Open a broadcast-lifetime guard with Self::publisher / Self::subscriber,
or skip straight to a track guard with Self::publisher_track /
Self::subscriber_track when the broadcast’s lifetime is tracked
elsewhere.
Implementations§
Source§impl BroadcastStats
impl BroadcastStats
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True if this handle has no underlying entry (path was under the aggregator’s own prefix, or stats are disabled). All bumps through an empty handle are no-ops.
Sourcepub fn publisher(&self) -> PublisherStats
pub fn publisher(&self) -> PublisherStats
Open a broadcast-lifetime guard for the publisher (egress) role.
Bumps announced on construction and announced_closed on drop.
(The emitted broadcasts counter is derived in the snapshot task
from subscription activity; see the module docs.)
Sourcepub fn subscriber(&self) -> SubscriberStats
pub fn subscriber(&self) -> SubscriberStats
Open a broadcast-lifetime guard for the subscriber (ingress) role.
Bumps announced on construction and announced_closed on drop.
(The emitted broadcasts counter is derived in the snapshot task
from subscription activity; see the module docs.)
Sourcepub fn publisher_track(&self, _name: &str) -> PublisherTrack
pub fn publisher_track(&self, _name: &str) -> PublisherTrack
Open a publisher-track guard.
_name is unused; counters are per-broadcast only. The track name
parameter is kept for symmetry with the rest of moq-net so callers
don’t have to thread an Option<&str> through subscribe sites.
Sourcepub fn subscriber_track(&self, _name: &str) -> SubscriberTrack
pub fn subscriber_track(&self, _name: &str) -> SubscriberTrack
Subscriber-side counterpart to Self::publisher_track.
Trait Implementations§
Source§impl Clone for BroadcastStats
impl Clone for BroadcastStats
Source§fn clone(&self) -> BroadcastStats
fn clone(&self) -> BroadcastStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more