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 covers no levels (its 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 broadcasts on construction and broadcasts_closed on drop.
Sourcepub fn subscriber(&self) -> SubscriberStats
pub fn subscriber(&self) -> SubscriberStats
Open a broadcast-lifetime guard for the subscriber (ingress) role.
Bumps broadcasts on construction and broadcasts_closed on drop.
Sourcepub fn publisher_track(&self, _name: &str) -> PublisherTrack
pub fn publisher_track(&self, _name: &str) -> PublisherTrack
Open a publisher-track guard without bumping the broadcast counters.
Use this when the broadcast is already counted by a PublisherStats
guard held elsewhere (e.g. by the announce loop), so the track guard
only contributes to subscription counters.
_name is currently unused; counters are per-level only. Reserved for
future per-track granularity.
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