pub struct BitrateRegistry {
pub(super) incoming_bitrates_by_session: BTreeMap<TransportSessionKey, SessionIncomingBitrates>,
pub(super) egress_bitrates_by_session: BTreeMap<TransportSessionKey, Arc<MediaBitrateCounter>>,
}Fields§
§incoming_bitrates_by_session: BTreeMap<TransportSessionKey, SessionIncomingBitrates>§egress_bitrates_by_session: BTreeMap<TransportSessionKey, Arc<MediaBitrateCounter>>Implementations§
Source§impl BitrateRegistry
impl BitrateRegistry
pub(super) fn register_incoming_media( &mut self, session_key: &TransportSessionKey, transport_media_id: TransportMediaId, now: Instant, ) -> Arc<MediaBitrateCounter>
pub(super) fn register_session_egress( &mut self, session_key: &TransportSessionKey, counter: Arc<MediaBitrateCounter>, )
pub(super) fn remove_incoming_media( &mut self, session_key: &TransportSessionKey, transport_media_id: TransportMediaId, )
pub(super) fn remove_session(&mut self, session_key: &TransportSessionKey)
pub fn transport_bitrate_snapshot_at( &self, session_keys: &[TransportSessionKey], now: Instant, ) -> TransportBitrateSnapshot
pub fn total_egress_bitrate_snapshot_at(&self, now: Instant) -> Bitrate
Trait Implementations§
Source§impl Debug for BitrateRegistry
impl Debug for BitrateRegistry
Source§impl Default for BitrateRegistry
impl Default for BitrateRegistry
Source§fn default() -> BitrateRegistry
fn default() -> BitrateRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BitrateRegistry
impl RefUnwindSafe for BitrateRegistry
impl Send for BitrateRegistry
impl Sync for BitrateRegistry
impl Unpin for BitrateRegistry
impl UnsafeUnpin for BitrateRegistry
impl UnwindSafe for BitrateRegistry
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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