pub struct Bitrate(/* private fields */);Expand description
A data rate expressed as bits per second(bps).
Internally the value is tracked as a floating point number for accuracy in the presence of repeated calculations that can yield decimal values.
Implementations§
Source§impl Bitrate
impl Bitrate
Sourcepub const INFINITY: Bitrate
pub const INFINITY: Bitrate
Positive infinity, useful as an invalid value with comparison semantics
Sourcepub const NEG_INFINITY: Bitrate
pub const NEG_INFINITY: Bitrate
Negative infinity, useful as an invalid value with comparison semantics
Sourcepub fn clamp(&self, min: Bitrate, max: Bitrate) -> Bitrate
pub fn clamp(&self, min: Bitrate, max: Bitrate) -> Bitrate
Clamp the value between a min and a max.
Sourcepub fn min(&self, other: Bitrate) -> Bitrate
pub fn min(&self, other: Bitrate) -> Bitrate
Return the minimum bitrate between self and other.
Trait Implementations§
Source§impl PartialOrd for Bitrate
impl PartialOrd for Bitrate
impl Copy 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