Struct Timescale
pub struct Timescale(/* private fields */);Expand description
Units per second used by a track for frame timestamps.
Newtype around NonZero<u64>. Zero is structurally impossible, so the
arithmetic on Timestamp can divide by self.scale without ever risking
a divide by zero. Use the named constants (Self::SECOND, Self::MILLI,
Self::MICRO, Self::NANO) instead of writing raw integers at call sites;
for runtime values, use Self::new or TryFrom, which return [TimeOverflow]
for 0 or for values past the QUIC varint range.
Implementations§
Trait Implementations§
impl Copy for Timescale
impl Eq for Timescale
§impl Ord for Timescale
impl Ord for Timescale
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
§impl PartialOrd for Timescale
impl PartialOrd for Timescale
impl StructuralPartialEq for Timescale
Auto Trait Implementations§
impl Freeze for Timescale
impl RefUnwindSafe for Timescale
impl Send for Timescale
impl Sync for Timescale
impl Unpin for Timescale
impl UnsafeUnpin for Timescale
impl UnwindSafe for Timescale
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.