[−][src]Struct libatm::midi_file::MIDIHeader
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: u32
format: u16
tracks: u16
division: u16
Implementations
impl MIDIHeader
[src]
pub fn new(
chunk_type: Vec<u8>,
length: u32,
format: MIDIFormat,
tracks: u16,
division: u16
) -> Self
[src]
chunk_type: Vec<u8>,
length: u32,
format: MIDIFormat,
tracks: u16,
division: u16
) -> Self
Create new MIDIHeader
pub fn write_buffer<T>(&self, target: &mut T) -> Result<()> where
T: WriteBytesExt,
[src]
T: WriteBytesExt,
Write header chunk to buffer
Trait Implementations
impl Clone for MIDIHeader
[src]
fn clone(&self) -> MIDIHeader
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MIDIHeader
[src]
impl PartialEq<MIDIHeader> for MIDIHeader
[src]
fn eq(&self, other: &MIDIHeader) -> bool
[src]
fn ne(&self, other: &MIDIHeader) -> bool
[src]
impl StructuralPartialEq for MIDIHeader
[src]
Auto Trait Implementations
impl RefUnwindSafe for MIDIHeader
impl Send for MIDIHeader
impl Sync for MIDIHeader
impl Unpin for MIDIHeader
impl UnwindSafe for MIDIHeader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,