pub struct Tick(/* private fields */);
Expand description
Fixed-point representation of time where each second is divided into
TICKS_PER_SECOND
.
This type can also represent negative time as this is common in DCCs like a video editor or animation system where this type would typically be used.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tick
impl<'de> Deserialize<'de> for Tick
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 FrameRateConversion<NonZero<u32>> for Tick
impl FrameRateConversion<NonZero<u32>> for Tick
Source§fn to_frame(self, frame_rate: FramesPerSec) -> i64
fn to_frame(self, frame_rate: FramesPerSec) -> i64
Convert ticks to frame number at the specified integer frame rate.
Source§fn from_frame(frame: i64, frame_rate: FramesPerSec) -> Self
fn from_frame(frame: i64, frame_rate: FramesPerSec) -> Self
Convert frame number to ticks at the specified integer frame rate.
Source§impl FrameRateConversion<StrictlyPositiveFinite<f32>> for Tick
impl FrameRateConversion<StrictlyPositiveFinite<f32>> for Tick
Source§fn to_frame(self, frame_rate: FramesPerSecF32) -> i64
fn to_frame(self, frame_rate: FramesPerSecF32) -> i64
Convert ticks to frame number at the specified floating point frame rate.
Source§fn from_frame(frame: i64, frame_rate: FramesPerSecF32) -> Self
fn from_frame(frame: i64, frame_rate: FramesPerSecF32) -> Self
Convert frame number to ticks at the specified floating point frame rate.
Source§impl FrameRateConversion<StrictlyPositiveFinite> for Tick
impl FrameRateConversion<StrictlyPositiveFinite> for Tick
Source§fn to_frame(self, frame_rate: FramesPerSecF64) -> i64
fn to_frame(self, frame_rate: FramesPerSecF64) -> i64
Convert ticks to frame number at the specified floating point frame rate.
Source§fn from_frame(frame: i64, frame_rate: FramesPerSecF64) -> Self
fn from_frame(frame: i64, frame_rate: FramesPerSecF64) -> Self
Convert frame number to ticks at the specified floating point frame rate.
Source§impl IntoIterator for Tick
impl IntoIterator for Tick
Source§impl Ord for Tick
impl Ord for Tick
Source§impl PartialOrd for Tick
impl PartialOrd for Tick
impl Copy for Tick
impl Eq for Tick
impl StructuralPartialEq for Tick
Auto Trait Implementations§
impl Freeze for Tick
impl RefUnwindSafe for Tick
impl Send for Tick
impl Sync for Tick
impl Unpin for Tick
impl UnwindSafe for Tick
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