pub enum VoiceID {
Wildcard,
ID(i32),
}Expand description
The identifier given to a specific voice. This is also known as the “note ID”.
Variants§
Implementations§
Source§impl VoiceID
impl VoiceID
Sourcepub const fn id(&self) -> Option<i32>
pub const fn id(&self) -> Option<i32>
Return the ID of the voice if it exists, or return None if it is a wildcard (the note
can belong to any voice).
Sourcepub const fn is_wildcard(&self) -> bool
pub const fn is_wildcard(&self) -> bool
Returns true if this is a wildcard (the note can belong to any voice).
Sourcepub fn id_or_fallback(&self, key: Key, channel: Channel) -> i32
pub fn id_or_fallback(&self, key: Key, channel: Channel) -> i32
Compute a voice ID if the host didn’t provide one. Polyphonic modulation will not work in this case, but playing notes will.
Trait Implementations§
impl Copy for VoiceID
impl Eq for VoiceID
Source§impl Ord for VoiceID
impl Ord for VoiceID
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for VoiceID
impl PartialOrd for VoiceID
impl StructuralPartialEq for VoiceID
Auto Trait Implementations§
impl Freeze for VoiceID
impl RefUnwindSafe for VoiceID
impl Send for VoiceID
impl Sync for VoiceID
impl Unpin for VoiceID
impl UnsafeUnpin for VoiceID
impl UnwindSafe for VoiceID
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