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
impl RefUnwindSafe for PortFilter
impl Send for PortFilter
impl Sync for PortFilter
impl Unpin for PortFilter
impl UnwindSafe for PortFilter