Struct rmididings::proc::PortsFilter [−][src]
pub struct PortsFilter(pub &'static [usize]);
Expand description
Filter on multiple port numbers
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 = PortsFilter(&[1,2]); let ev1 = NoteOnEvent(0,0,60,20); let ev2 = NoteOnEvent(1,0,60,20); let ev3 = NoteOnEvent(2,0,60,20); let ev4 = NoteOnEvent(4,0,60,20); let mut evs = EventStream::from(vec![&ev1, &ev2, &ev3, &ev4]); filter.run(&mut evs); assert_eq!(evs, vec![ev2, ev3]);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PortsFilter
impl Send for PortsFilter
impl Sync for PortsFilter
impl Unpin for PortsFilter
impl UnwindSafe for PortsFilter