embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

MessageType

Enum MessageType 

Source
#[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

Source

pub const fn from_nibble(nibble: u8) -> Self

Return the message type from a 4-bit nibble.

Source

pub const fn word_count(self) -> usize

Number of 32-bit words for this message type.

Source

pub const fn byte_count(self) -> usize

Number of bytes on the wire for this message type.

Trait Implementations§

Source§

impl Clone for MessageType

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MessageType

Source§

impl Debug for MessageType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MessageType

Source§

impl Format for MessageType

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl PartialEq for MessageType

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MessageType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.