[][src]Enum polyphony::VoiceAssignment

pub enum VoiceAssignment {
    None,
    All,
    Some {
        index: usize,
    },
}

Describe to what particular voice an event should be assigned.

Variants

None

This event should be assigned to no particular voice (i.e.: it should simply be dropped).

All

This event should be assigned to all voices.

Some

This event should be assigned to the voice with the given index

Fields of Some

index: usize

Implementations

impl VoiceAssignment[src]

pub fn dispatch<E, F, V>(self, event: E, voices: &mut [V], action: F) where
    E: Copy,
    F: FnMut(&mut V, E), 
[src]

Dispatch an action to the assigned voices.

Trait Implementations

impl Clone for VoiceAssignment[src]

impl Copy for VoiceAssignment[src]

impl Debug for VoiceAssignment[src]

impl Eq for VoiceAssignment[src]

impl PartialEq<VoiceAssignment> for VoiceAssignment[src]

impl StructuralEq for VoiceAssignment[src]

impl StructuralPartialEq for VoiceAssignment[src]

Auto Trait Implementations

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.