Struct midi_msg::StandardTimeCode[][src]

pub struct StandardTimeCode {
    pub subframes: SubFrames,
    pub frames: i8,
    pub seconds: u8,
    pub minutes: u8,
    pub hours: u8,
    pub code_type: TimeCodeType,
}

Like TimeCode but uses subframes to optionally include status flags, and fractional frames. Also may be negative. Used in MachineControlCommandMsg.

As defined in MIDI Machine Control 1.0 (MMA0016 / RP013) and MIDI Show Control 1.1.1 (RP002/RP014)

Fields

subframes: SubFramesframes: i8

The position in frames, where a negative value indicates a negative TimeCode, -29-29

seconds: u8

The position in seconds, 0-59

minutes: u8

The position in minutes, 0-59

hours: u8

The position in hours, 0-23

code_type: TimeCodeType

Implementations

impl StandardTimeCode[src]

pub fn to_bytes(self) -> [u8; 5][src]

Return the five byte representation of the frame: [fractional_frames, frames, seconds, minutes, timecode + hours]

pub fn to_bytes_short(self) -> [u8; 2][src]

The two byte representation of the frame: [fractional_frames, frames]

Trait Implementations

impl Clone for StandardTimeCode[src]

impl Copy for StandardTimeCode[src]

impl Debug for StandardTimeCode[src]

impl Default for StandardTimeCode[src]

impl From<TimeCode> for StandardTimeCode[src]

impl PartialEq<StandardTimeCode> for StandardTimeCode[src]

impl StructuralPartialEq for StandardTimeCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.