pub struct DataTrackFrame { /* private fields */ }Expand description
Implementations§
Source§impl DataTrackFrame
impl DataTrackFrame
Sourcepub fn user_timestamp(&self) -> Option<u64>
pub fn user_timestamp(&self) -> Option<u64>
Returns the frame’s user timestamp, if one is associated.
Sourcepub fn duration_since_timestamp(&self) -> Option<Duration>
pub fn duration_since_timestamp(&self) -> Option<Duration>
If the frame has a user timestamp, calculate how long has passed relative to the current system time.
If a timestamp is present, it is assumed it is a UNIX timestamp in milliseconds
(as can be set with Self::with_user_timestamp_now on the publisher side).
If the timestamp is invalid or not present, the result is none.
Source§impl DataTrackFrame
impl DataTrackFrame
Sourcepub fn with_user_timestamp(self, value: u64) -> Self
pub fn with_user_timestamp(self, value: u64) -> Self
Associates a user timestamp with the frame.
Sourcepub fn with_user_timestamp_now(self) -> Self
pub fn with_user_timestamp_now(self) -> Self
Associates the current Unix timestamp (in milliseconds) with the frame.
Trait Implementations§
Source§impl Clone for DataTrackFrame
impl Clone for DataTrackFrame
Source§fn clone(&self) -> DataTrackFrame
fn clone(&self) -> DataTrackFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataTrackFrame
impl Debug for DataTrackFrame
Source§impl Default for DataTrackFrame
impl Default for DataTrackFrame
Source§fn default() -> DataTrackFrame
fn default() -> DataTrackFrame
Returns the “default value” for a type. Read more
Source§impl From<&'static [u8]> for DataTrackFrame
impl From<&'static [u8]> for DataTrackFrame
Source§impl From<Bytes> for DataTrackFrame
impl From<Bytes> for DataTrackFrame
Auto Trait Implementations§
impl !Freeze for DataTrackFrame
impl RefUnwindSafe for DataTrackFrame
impl Send for DataTrackFrame
impl Sync for DataTrackFrame
impl Unpin for DataTrackFrame
impl UnsafeUnpin for DataTrackFrame
impl UnwindSafe for DataTrackFrame
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