pub struct UsbMidiEventPacket(/* private fields */);Expand description
One USB-MIDI 1.0 event packet.
Implementations§
Source§impl UsbMidiEventPacket
impl UsbMidiEventPacket
Sourcepub fn from_midi_bytes(cable: u8, data: &[u8]) -> Result<Self, MidiPacketError>
pub fn from_midi_bytes(cable: u8, data: &[u8]) -> Result<Self, MidiPacketError>
Encode one complete non-SysEx MIDI 1.0 message for a virtual cable.
Sourcepub const fn cin(&self) -> u8
pub const fn cin(&self) -> u8
Code Index Number describing the MIDI message carried by this packet.
Sourcepub const fn message_len(&self) -> Option<usize>
pub const fn message_len(&self) -> Option<usize>
Number of valid MIDI bytes, or None for a reserved CIN.
Trait Implementations§
Source§impl Clone for UsbMidiEventPacket
impl Clone for UsbMidiEventPacket
Source§fn clone(&self) -> UsbMidiEventPacket
fn clone(&self) -> UsbMidiEventPacket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UsbMidiEventPacket
Source§impl Debug for UsbMidiEventPacket
impl Debug for UsbMidiEventPacket
impl Eq for UsbMidiEventPacket
Source§impl Format for UsbMidiEventPacket
impl Format for UsbMidiEventPacket
Source§impl PartialEq for UsbMidiEventPacket
impl PartialEq for UsbMidiEventPacket
impl StructuralPartialEq for UsbMidiEventPacket
Auto Trait Implementations§
impl Freeze for UsbMidiEventPacket
impl RefUnwindSafe for UsbMidiEventPacket
impl Send for UsbMidiEventPacket
impl Sync for UsbMidiEventPacket
impl Unpin for UsbMidiEventPacket
impl UnsafeUnpin for UsbMidiEventPacket
impl UnwindSafe for UsbMidiEventPacket
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