pub enum EventPattern {
AnyButton,
ButtonId(u32),
AnyKnob,
KnobId(u32),
AnyFader,
FaderId(u32),
AnyMidi,
MidiControl {
channel: Option<u8>,
controller: u8,
},
MidiNote {
channel: Option<u8>,
note: Option<u8>,
},
OscAddress(String),
OscPattern(String),
}Expand description
A pattern for matching controller events.
Variants§
AnyButton
Any button.
ButtonId(u32)
A button with a specific ID.
AnyKnob
Any knob.
KnobId(u32)
A knob with a specific ID.
AnyFader
Any fader.
FaderId(u32)
A fader with a specific ID.
AnyMidi
Any MIDI message.
MidiControl
MIDI Control Change.
MidiNote
MIDI Note.
Fields
OscAddress(String)
Exact OSC address.
OscPattern(String)
OSC address pattern (substring match).
Implementations§
Source§impl EventPattern
impl EventPattern
Sourcepub fn matches(&self, event: &ControlEvent) -> bool
pub fn matches(&self, event: &ControlEvent) -> bool
Check whether the given event matches this pattern.
Trait Implementations§
Source§impl Clone for EventPattern
impl Clone for EventPattern
Source§fn clone(&self) -> EventPattern
fn clone(&self) -> EventPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventPattern
impl Debug for EventPattern
Source§impl Hash for EventPattern
impl Hash for EventPattern
Source§impl PartialEq for EventPattern
impl PartialEq for EventPattern
impl Eq for EventPattern
impl StructuralPartialEq for EventPattern
Auto Trait Implementations§
impl Freeze for EventPattern
impl RefUnwindSafe for EventPattern
impl Send for EventPattern
impl Sync for EventPattern
impl Unpin for EventPattern
impl UnsafeUnpin for EventPattern
impl UnwindSafe for EventPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more