pub struct Bitrate(pub(crate) u64);Expand description
Media bitrate stored as bits per second (not bytes per second).
Tuple Fields§
§0: u64Implementations§
Source§impl Bitrate
impl Bitrate
pub const fn from_bps(value: u64) -> Self
pub const fn from_kbps(value: u64) -> Self
pub const fn from_mbps(value: u64) -> Self
pub const fn zero() -> Self
pub const fn as_bps(self) -> u64
pub const fn saturating_add(self, other: Self) -> Self
pub const fn saturating_sub(self, other: Self) -> Self
pub const fn divided_by(self, divisor: u64) -> Self
Trait Implementations§
Source§impl Ord for Bitrate
impl Ord for Bitrate
Source§impl PartialOrd for Bitrate
impl PartialOrd for Bitrate
impl Copy for Bitrate
impl Eq for Bitrate
impl StructuralPartialEq for Bitrate
Auto Trait Implementations§
impl Freeze for Bitrate
impl RefUnwindSafe for Bitrate
impl Send for Bitrate
impl Sync for Bitrate
impl Unpin for Bitrate
impl UnsafeUnpin for Bitrate
impl UnwindSafe for Bitrate
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> 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