pub struct MidiFile { /* private fields */ }
Expand description
Represents a MIDI file, which consists of a header identifying the type of MIDI file, and tracks with MIDI data.
Implementations§
source§impl MidiFile
impl MidiFile
sourcepub fn running_status(&self) -> bool
pub fn running_status(&self) -> bool
A getter for the running_status
field.
sourcepub fn new_with_settings(settings: Settings) -> Self
pub fn new_with_settings(settings: Settings) -> Self
Create a new MidiFile
with customizable Settings
.
pub fn tracks_len(&self) -> u32
sourcepub fn track(&self, index: u32) -> Option<&Track>
pub fn track(&self, index: u32) -> Option<&Track>
Get a reference to the track at index
if it exists.
pub fn push_track(&mut self, track: Track) -> Result<()>
pub fn insert_track(&mut self, index: u32, track: Track) -> Result<()>
pub fn remove_track(&mut self, index: u32) -> Result<Track>
Trait Implementations§
source§impl Ord for MidiFile
impl Ord for MidiFile
source§impl PartialEq for MidiFile
impl PartialEq for MidiFile
source§impl PartialOrd for MidiFile
impl PartialOrd for MidiFile
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for MidiFile
impl StructuralEq for MidiFile
impl StructuralPartialEq for MidiFile
Auto Trait Implementations§
impl RefUnwindSafe for MidiFile
impl Send for MidiFile
impl Sync for MidiFile
impl Unpin for MidiFile
impl UnwindSafe for MidiFile
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more