[][src]Struct embedded_midi::MidiParser

pub struct MidiParser { /* fields omitted */ }

Keeps state for parsing Midi messages

Implementations

impl MidiParser[src]

State machine for parsing Midi data, can be fed bytes one-by-one, and returns parsed Midi messages whenever one is completed.

pub fn new() -> Self[src]

Initialize midiparser state

pub fn parse_byte(&mut self, byte: u8) -> Option<MidiMessage>[src]

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

impl Clone for MidiParser[src]

impl Debug for MidiParser[src]

impl PartialEq<MidiParser> for MidiParser[src]

impl StructuralPartialEq for MidiParser[src]

Auto Trait Implementations

impl Send for MidiParser

impl Sync for MidiParser

impl Unpin for MidiParser

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, 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.