pub struct TimecodeRun {
pub start: Timecode,
pub frame_count: u64,
}Expand description
A contiguous run of timecodes sharing the same frame rate.
Fields§
§start: TimecodeStarting timecode of the run.
frame_count: u64Number of frames in this run (inclusive of the start frame).
Implementations§
Source§impl TimecodeRun
impl TimecodeRun
Sourcepub fn new(start: Timecode, frame_count: u64) -> Result<Self, TimecodeError>
pub fn new(start: Timecode, frame_count: u64) -> Result<Self, TimecodeError>
Create a new timecode run beginning at start spanning frame_count frames.
§Errors
Returns TimecodeError::InvalidConfiguration when frame_count is zero.
Sourcepub fn duration_secs(&self) -> f64
pub fn duration_secs(&self) -> f64
Duration of the run in seconds (approximate for non-integer frame rates).
Sourcepub fn end_timecode(&self, rate: FrameRate) -> Result<Timecode, TimecodeError>
pub fn end_timecode(&self, rate: FrameRate) -> Result<Timecode, TimecodeError>
Compute the end timecode (last frame in the run).
§Errors
Returns an error if the resulting timecode exceeds 24-hour bounds.
Trait Implementations§
Source§impl Clone for TimecodeRun
impl Clone for TimecodeRun
Source§fn clone(&self) -> TimecodeRun
fn clone(&self) -> TimecodeRun
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 TimecodeRun
impl Debug for TimecodeRun
Source§impl PartialEq for TimecodeRun
impl PartialEq for TimecodeRun
impl StructuralPartialEq for TimecodeRun
Auto Trait Implementations§
impl Freeze for TimecodeRun
impl RefUnwindSafe for TimecodeRun
impl Send for TimecodeRun
impl Sync for TimecodeRun
impl Unpin for TimecodeRun
impl UnsafeUnpin for TimecodeRun
impl UnwindSafe for TimecodeRun
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