[][src]Enum polyphony::EventDispatchClass

pub enum EventDispatchClass<Identifier> {
    Broadcast,
    AssignNewVoice(Identifier),
    VoiceSpecific(Identifier),
}

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

impl<Identifier: Clone> Clone for EventDispatchClass<Identifier>[src]

impl<Identifier: Copy> Copy for EventDispatchClass<Identifier>[src]

impl<Identifier: Debug> Debug for EventDispatchClass<Identifier>[src]

impl<Identifier: Eq> Eq for EventDispatchClass<Identifier>[src]

impl<Identifier: PartialEq> PartialEq<EventDispatchClass<Identifier>> for EventDispatchClass<Identifier>[src]

impl<Identifier> StructuralEq for EventDispatchClass<Identifier>[src]

impl<Identifier> StructuralPartialEq for EventDispatchClass<Identifier>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.