[][src]Struct alsa::seq::MidiEvent

pub struct MidiEvent(_);

snd_midi_event_t Wrapper

Sequencer event <-> MIDI byte stream coder

Methods

impl MidiEvent[src]

pub fn new(bufsize: u32) -> Result<MidiEvent>[src]

pub fn resize_buffer(&self, bufsize: u32) -> Result<()>[src]

pub fn enable_running_status(&self, enable: bool)[src]

Note: this corresponds to snd_midi_event_no_status, but on and off are switched.

Alsa-lib is a bit confusing here. Anyhow, set "enable" to true to enable running status.

pub fn decode(&self, buf: &mut [u8], ev: &mut Event) -> Result<usize>[src]

pub fn encode<'a>(
    &'a mut self,
    buf: &[u8]
) -> Result<(usize, Option<Event<'a>>)>
[src]

In case of success, returns a tuple of (bytes consumed from buf, found Event).

Trait Implementations

impl Drop for MidiEvent[src]

Auto Trait Implementations

impl !Send for MidiEvent

impl !Sync for MidiEvent

Blanket Implementations

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.

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

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

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