pub enum EventDispatchClass<Identifier> {
Broadcast,
AssignNewVoice(Identifier),
VoiceSpecific(Identifier),
}
Expand description
Describe how an event should be dispatched.
§Example.
Suppose events are dispatched based on the tone that is played.
Then EventDispatchClass::VoiceSpecific(ToneIdentifier(60))
means that this event
should be dispatched to whatever voice is currently playing the tone with midi number 60
(central C on the piano).
Variants§
Broadcast
The event should be dispatched to all voices
AssignNewVoice(Identifier)
The event should be dispatched to a newly created voice with the given identifier
VoiceSpecific(Identifier)
The event should be dispatched to an already existing voice with the given identifier
Trait Implementations§
Source§impl<Identifier: Clone> Clone for EventDispatchClass<Identifier>
impl<Identifier: Clone> Clone for EventDispatchClass<Identifier>
Source§fn clone(&self) -> EventDispatchClass<Identifier>
fn clone(&self) -> EventDispatchClass<Identifier>
Returns a copy 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<Identifier: Debug> Debug for EventDispatchClass<Identifier>
impl<Identifier: Debug> Debug for EventDispatchClass<Identifier>
Source§impl<Identifier: PartialEq> PartialEq for EventDispatchClass<Identifier>
impl<Identifier: PartialEq> PartialEq for EventDispatchClass<Identifier>
Source§fn eq(&self, other: &EventDispatchClass<Identifier>) -> bool
fn eq(&self, other: &EventDispatchClass<Identifier>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<Identifier: Copy> Copy for EventDispatchClass<Identifier>
impl<Identifier: Eq> Eq for EventDispatchClass<Identifier>
impl<Identifier> StructuralPartialEq for EventDispatchClass<Identifier>
Auto Trait Implementations§
impl<Identifier> Freeze for EventDispatchClass<Identifier>where
Identifier: Freeze,
impl<Identifier> RefUnwindSafe for EventDispatchClass<Identifier>where
Identifier: RefUnwindSafe,
impl<Identifier> Send for EventDispatchClass<Identifier>where
Identifier: Send,
impl<Identifier> Sync for EventDispatchClass<Identifier>where
Identifier: Sync,
impl<Identifier> Unpin for EventDispatchClass<Identifier>where
Identifier: Unpin,
impl<Identifier> UnwindSafe for EventDispatchClass<Identifier>where
Identifier: UnwindSafe,
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