#[repr(u8)]pub enum MessageType {
Show 16 variants
Utility = 0,
System = 1,
Midi1ChannelVoice = 2,
Data64 = 3,
Midi2ChannelVoice = 4,
Data128 = 5,
Reserved6 = 6,
Reserved7 = 7,
Reserved8 = 8,
Reserved9 = 9,
ReservedA = 10,
ReservedB = 11,
ReservedC = 12,
FlexData = 13,
ReservedE = 14,
Stream = 15,
}Expand description
UMP Message Types (MT, 4 bits, Table 1 in Universal MIDI Packet specification).
Variants§
Utility = 0
0x0: 32-bit Utility Messages (NOP, Timestamps)
System = 1
0x1: 32-bit System Real Time and System Common Messages
Midi1ChannelVoice = 2
0x2: 32-bit MIDI 1.0 Channel Voice Messages
Data64 = 3
0x3: 64-bit Data Messages (SysEx 7-bit)
Midi2ChannelVoice = 4
0x4: 64-bit MIDI 2.0 Channel Voice Messages
Data128 = 5
0x5: 128-bit Data Messages (SysEx 8-bit & Mixed Data Sets)
Reserved6 = 6
0x6: 32-bit Reserved
Reserved7 = 7
0x7: 32-bit Reserved
Reserved8 = 8
0x8: 64-bit Reserved
Reserved9 = 9
0x9: 64-bit Reserved
ReservedA = 10
0xA: 64-bit Reserved
ReservedB = 11
0xB: 96-bit Reserved
ReservedC = 12
0xC: 96-bit Reserved
FlexData = 13
0xD: 128-bit Flex Data Messages
ReservedE = 14
0xE: 128-bit Reserved
Stream = 15
0xF: 128-bit Stream Messages
Implementations§
Source§impl MessageType
impl MessageType
Sourcepub const fn from_nibble(nibble: u8) -> Self
pub const fn from_nibble(nibble: u8) -> Self
Return the message type from a 4-bit nibble.
Sourcepub const fn word_count(self) -> usize
pub const fn word_count(self) -> usize
Number of 32-bit words for this message type.
Sourcepub const fn byte_count(self) -> usize
pub const fn byte_count(self) -> usize
Number of bytes on the wire for this message type.
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
impl Copy for MessageType
Source§impl Debug for MessageType
impl Debug for MessageType
impl Eq for MessageType
Source§impl Format for MessageType
impl Format for MessageType
Source§impl PartialEq for MessageType
impl PartialEq for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Forget for MessageType
impl Freeze for MessageType
impl Move for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnsafeUnpin for MessageType
impl UnwindSafe for MessageType
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