pub struct MidiParser { /* private fields */ }
Expand description
Keeps state for parsing Midi messages
Implementations§
Source§impl MidiParser
State machine for parsing Midi data, can be fed bytes one-by-one, and returns parsed Midi
messages whenever one is completed.
impl MidiParser
State machine for parsing Midi data, can be fed bytes one-by-one, and returns parsed Midi messages whenever one is completed.
Sourcepub fn parse_byte(&mut self, byte: u8) -> Option<MidiMessage>
pub fn parse_byte(&mut self, byte: u8) -> Option<MidiMessage>
Parse midi event byte by byte. Call this whenever a byte is received. When a midi-event is completed it is returned, otherwise this method updates the internal midiparser state and and returns none.
Trait Implementations§
Source§impl Clone for MidiParser
impl Clone for MidiParser
Source§fn clone(&self) -> MidiParser
fn clone(&self) -> MidiParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MidiParser
impl Debug for MidiParser
Source§impl PartialEq for MidiParser
impl PartialEq for MidiParser
impl StructuralPartialEq for MidiParser
Auto Trait Implementations§
impl Freeze for MidiParser
impl RefUnwindSafe for MidiParser
impl Send for MidiParser
impl Sync for MidiParser
impl Unpin for MidiParser
impl UnwindSafe for MidiParser
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