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 broadcasts sentinel is driven separately by
SessionBroadcasts; 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 broadcasts sentinel is driven separately by
SessionBroadcasts; 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 publisher_announced_bytes(&self, n: u64)
pub fn publisher_announced_bytes(&self, n: u64)
Record n announce-control bytes (the broadcast name length) for one
publisher-side announce/unannounce, independent of any lifetime guard.
Recording is keyed by broadcast path, so it still captures messages
whose matching guard was skipped, reflected, or already dropped (e.g.
an unannounce whose announce was filtered out). Bumps announced_bytes;
distinct from PublisherTrack::bytes, which counts media payload.
Sourcepub fn subscriber_announced_bytes(&self, n: u64)
pub fn subscriber_announced_bytes(&self, n: u64)
Subscriber-side counterpart to Self::publisher_announced_bytes.
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