[][src]Struct libatm::midi_file::MIDIHeader

pub struct MIDIHeader {
    pub chunk_type: Vec<u8>,
    pub length: u32,
    pub format: u16,
    pub tracks: u16,
    pub division: u16,
}

MIDI file header

Unlike the MIDITrackHeader, this structure is specified in the official MIDI spec (as "Header Chunk"), though the last three 16-bit fields are simply referred to as "Data". For a more detailed discussion of the Header Chunk, see section 2.1 of the document here: https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf.

Fields

chunk_type: Vec<u8>length: u32format: u16tracks: u16division: u16

Methods

impl MIDIHeader[src]

pub fn new(
    chunk_type: Vec<u8>,
    length: u32,
    format: MIDIFormat,
    tracks: u16,
    division: u16
) -> Self
[src]

Create new MIDIHeader

pub fn write_buffer<T>(&self, target: &mut T) -> Result<()> where
    T: WriteBytesExt
[src]

Write header chunk to buffer

Trait Implementations

impl Clone for MIDIHeader[src]

impl PartialEq<MIDIHeader> for MIDIHeader[src]

impl Debug for MIDIHeader[src]

impl StructuralPartialEq for MIDIHeader[src]

Auto Trait Implementations

impl Send for MIDIHeader

impl Sync for MIDIHeader

impl Unpin for MIDIHeader

impl UnwindSafe for MIDIHeader

impl RefUnwindSafe for MIDIHeader

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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