Struct video_timecode::Timecode [] [src]

pub struct Timecode<FrameRate> {
    pub hour: u8,
    pub minute: u8,
    pub second: u8,
    pub frame: u8,
    pub drop_frame: bool,
    pub frame_number: u32,
    // some fields omitted
}

Representation of a timecode

Fields

Methods

impl<T> Timecode<T>
[src]

[src]

Returns a timecode with the given properties.

Arguments

  • hour - Hour part of timecode
  • minute - Minute part of timecode
  • second - Second part of timecode
  • frame - Frame part of timecode

Example

use video_timecode::*;

let timecode = match Timecode::<FrameRate24>::new(10, 0, 0, 0) {
    Ok(tc) => tc,
    _ => panic!()
};

assert_eq!(timecode.hour, 10);
assert_eq!(timecode.minute, 0);
assert_eq!(timecode.second, 0);
assert_eq!(timecode.frame, 0);

Trait Implementations

impl<FrameRate: Debug> Debug for Timecode<FrameRate>
[src]

[src]

Formats the value using the given formatter.

impl<FrameRate: PartialEq> PartialEq for Timecode<FrameRate>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.