#[repr(u8)]pub enum Channel {
Show 16 variants
One = 0,
Two = 1,
Three = 2,
Four = 3,
Five = 4,
Six = 5,
Seven = 6,
Eight = 7,
Nine = 8,
Ten = 9,
Eleven = 10,
Twelve = 11,
Thirteen = 12,
Fourteen = 13,
Fifteen = 14,
Sixteen = 15,
}Expand description
Identifies a channel for MIDI.
To get this channel from a u8, use Channel::try_from_primitive.
Variants§
One = 0
0bxxxx0000
Two = 1
0bxxxx0001
Three = 2
0bxxxx0010
Four = 3
0bxxxx0011
Five = 4
0bxxxx0100
Six = 5
0bxxxx0101
Seven = 6
0bxxxx0110
Eight = 7
0bxxxx0111
Nine = 8
0bxxxx1000
Ten = 9
0bxxxx1001
Eleven = 10
0bxxxx1010
Twelve = 11
0bxxxx1011
Thirteen = 12
0bxxxx1100
Fourteen = 13
0bxxxx1101
Fifteen = 14
0bxxxx1110
Sixteen = 15
0bxxxx1111
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn send_event(self, event: VoiceEvent) -> ChannelVoiceMessage
pub fn send_event(self, event: VoiceEvent) -> ChannelVoiceMessage
Send a voice event to this channel
Sourcepub fn from_status(status: u8) -> Self
pub fn from_status(status: u8) -> Self
Given a status byte from some ChannelVoiceMessage, perform bitwise ops
to get the channel
Trait Implementations§
Source§impl Ord for Channel
impl Ord for Channel
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
Source§impl PartialOrd for Channel
impl PartialOrd for Channel
Source§impl TryFromPrimitive for Channel
impl TryFromPrimitive for Channel
impl Copy for Channel
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin for Channel
impl UnwindSafe for Channel
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