Skip to main content

MidiSource

Trait MidiSource 

Source
pub trait MidiSource {
    type Err;

    // Required methods
    fn tpq(&self) -> u32;
    fn next(&mut self) -> Result<Option<MidiEvent>, Self::Err>;
}
Expand description

A pull-based stream of MidiEvents at a fixed resolution.

Required Associated Types§

Source

type Err

Error type returned by next.

Required Methods§

Source

fn tpq(&self) -> u32

Returns the source resolution in ticks per quarter note.

Source

fn next(&mut self) -> Result<Option<MidiEvent>, Self::Err>

Returns the next event, or None once the stream is exhausted.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§