Struct rmididings::proc::PortFilter[][src]

pub struct PortFilter(pub usize);
Expand description

Filter on port number

When calling [RMididings.config()] the in_ports and out_ports are arrays that indicate which MIDI ports to create. The index in these arrays are the port number (starting with index 0).

Examples

let filter = PortFilter(1);

let ev1 = NoteOnEvent(0,0,60,20);
let ev2 = NoteOnEvent(1,0,60,20);

let mut evs = EventStream::from(vec![&ev1, &ev2]);
filter.run(&mut evs);
assert_eq!(evs, ev2)

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.