pub struct MidiPacketEvent { /* private fields */ }Expand description
A single timed MIDI event within a MidiPacket.
Holds the event time in ticks, the ticks-per-quarter-note (TPQ) resolution the ticks are measured against, and the raw MIDI message bytes.
Implementations§
Source§impl MidiPacketEvent
impl MidiPacketEvent
Sourcepub fn new(ticks: i64, tpq: u16, bytes: Vec<u8>) -> Result<Self>
pub fn new(ticks: i64, tpq: u16, bytes: Vec<u8>) -> Result<Self>
Builds an event from its tick time, TPQ resolution, and message bytes.
Returns an error when tpq is zero, since a zero resolution cannot
time the event.
Trait Implementations§
Source§impl Clone for MidiPacketEvent
impl Clone for MidiPacketEvent
Source§fn clone(&self) -> MidiPacketEvent
fn clone(&self) -> MidiPacketEvent
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 moreSource§impl Debug for MidiPacketEvent
impl Debug for MidiPacketEvent
impl Eq for MidiPacketEvent
Source§impl PartialEq for MidiPacketEvent
impl PartialEq for MidiPacketEvent
Source§fn eq(&self, other: &MidiPacketEvent) -> bool
fn eq(&self, other: &MidiPacketEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MidiPacketEvent
Auto Trait Implementations§
impl Freeze for MidiPacketEvent
impl RefUnwindSafe for MidiPacketEvent
impl Send for MidiPacketEvent
impl Sync for MidiPacketEvent
impl Unpin for MidiPacketEvent
impl UnsafeUnpin for MidiPacketEvent
impl UnwindSafe for MidiPacketEvent
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