pub struct Time(/* private fields */);
Expand description
The clock of a scribl.
Implementations§
Source§impl Time
impl Time
pub const ZERO: Time
pub fn from_micros(us: i64) -> Time
pub fn as_micros(&self) -> i64
pub fn as_gst_clock_time(&self) -> ClockTime
pub fn from_video_frame(frame: u32, fps: f64) -> Time
pub fn as_video_frame(&self, fps: f64) -> u32
pub fn as_audio_idx(&self, sample_rate: u32) -> usize
pub fn from_audio_idx(idx: usize, sample_rate: u32) -> Time
Trait Implementations§
Source§impl AddAssign<TimeDiff> for Time
impl AddAssign<TimeDiff> for Time
Source§fn add_assign(&mut self, rhs: TimeDiff)
fn add_assign(&mut self, rhs: TimeDiff)
Performs the
+=
operation. Read moreSource§impl<'de> Deserialize<'de> for Time
impl<'de> Deserialize<'de> for Time
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Time
impl Ord for Time
Source§impl PartialOrd for Time
impl PartialOrd for Time
Source§impl SubAssign<TimeDiff> for Time
impl SubAssign<TimeDiff> for Time
Source§fn sub_assign(&mut self, rhs: TimeDiff)
fn sub_assign(&mut self, rhs: TimeDiff)
Performs the
-=
operation. Read moreimpl Copy for Time
impl Eq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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