Struct video_timecode::Timecode
[−]
[src]
pub struct Timecode<FrameRate> {
pub frame_number: u32,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub frame: u8,
// some fields omitted
}Representation of a timecode
Fields
frame_number: u32
hour: u8
minute: u8
second: u8
frame: u8
Methods
impl<T> Timecode<T>[src]
fn new(
hour: u8,
minute: u8,
second: u8,
frame: u8
) -> Result<Timecode<T>, &'static str> where
T: FrameRate, [src]
hour: u8,
minute: u8,
second: u8,
frame: u8
) -> Result<Timecode<T>, &'static str> where
T: FrameRate,
Returns a timecode with the given properties.
Arguments
hour- Hour part of timecodeminute- Minute part of timecodesecond- Second part of timecodeframe- 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.frame_number, 864000);
Trait Implementations
impl<FrameRate: Debug> Debug for Timecode<FrameRate>[src]
impl<FrameRate: PartialEq> PartialEq for Timecode<FrameRate>[src]
fn eq(&self, __arg_0: &Timecode<FrameRate>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Timecode<FrameRate>) -> bool[src]
This method tests for !=.
impl<T> From<usize> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<usize> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: usize) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<u8> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<u8> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: u8) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<u16> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<u16> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: u16) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<u32> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<u32> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: u32) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<u64> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<u64> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: u64) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<isize> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<isize> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: isize) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<i8> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<i8> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: i8) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<i16> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<i16> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: i16) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<i32> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<i32> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
type Output = Timecode<T>
The resulting type after applying the + operator.
fn add(self, other: i32) -> Timecode<T>[src]
Performs the + operation.
impl<T> From<i64> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,
impl<T> Add<i64> for Timecode<T> where
T: FrameRate, [src]
T: FrameRate,