Skip to main content

Message

Trait Message 

Source
pub trait Message
where Self: Deref<Target = [u32]>,
{ type Data; type Status; // Required methods fn message_type(&self) -> MessageType; fn group(&self) -> u8; fn status(&self) -> Self::Status; fn data(&self) -> Self::Data; }
Expand description

A shared trait by all MIDI messages.

Required Associated Types§

Source

type Data

A rich type representation of this message’s data.

Source

type Status

A rich type representation of this message’s status.

Required Methods§

Source

fn message_type(&self) -> MessageType

The mt nibble of the message (most significant four bits).

Source

fn group(&self) -> u8

The group that this message is destined for.

Source

fn status(&self) -> Self::Status

The status information of this message, eg NoteOn.

Source

fn data(&self) -> Self::Data

The data contents of this message.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§