pub struct Timecode {
pub hours: u8,
pub minutes: u8,
pub seconds: u8,
pub frames: u8,
pub drop_frame: bool,
pub frame_rate: Rational,
}Expand description
Timecode representation.
Fields§
§hours: u8Hours (0-23).
minutes: u8Minutes (0-59).
seconds: u8Seconds (0-59).
frames: u8Frames (0-fps).
drop_frame: boolDrop-frame flag.
frame_rate: RationalFrame rate.
Implementations§
Source§impl Timecode
impl Timecode
Sourcepub fn new(
hours: u8,
minutes: u8,
seconds: u8,
frames: u8,
drop_frame: bool,
frame_rate: Rational,
) -> Self
pub fn new( hours: u8, minutes: u8, seconds: u8, frames: u8, drop_frame: bool, frame_rate: Rational, ) -> Self
Create a new timecode.
Sourcepub fn from_frames(frames: i64, frame_rate: Rational, drop_frame: bool) -> Self
pub fn from_frames(frames: i64, frame_rate: Rational, drop_frame: bool) -> Self
Create timecode from frame count.
Trait Implementations§
impl StructuralPartialEq for Timecode
Auto Trait Implementations§
impl Freeze for Timecode
impl RefUnwindSafe for Timecode
impl Send for Timecode
impl Sync for Timecode
impl Unpin for Timecode
impl UnsafeUnpin for Timecode
impl UnwindSafe for Timecode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more