pub struct AbsoluteEvent { /* private fields */ }
Expand description
An AbsoluteEvent is an event that has an absolute time This is useful for apps that want to store events internally with absolute times and then quickly build an SMF file for saving etc…
Implementations§
Source§impl AbsoluteEvent
impl AbsoluteEvent
pub fn new_midi(time: u64, midi: MidiMessage) -> AbsoluteEvent
pub fn new_meta(time: u64, meta: MetaEvent) -> AbsoluteEvent
Sourcepub fn is_midi(&self) -> bool
pub fn is_midi(&self) -> bool
Return true if the event inside this AbsoluteEvent is a midi event, false if it’s a meta event
Sourcepub fn is_meta(&self) -> bool
pub fn is_meta(&self) -> bool
Return true if the event inside this AbsoluteEvent is a meta event, false if it’s a midi event
pub fn get_event(&self) -> &Event
pub fn get_time(&self) -> u64
Trait Implementations§
Source§impl Ord for AbsoluteEvent
impl Ord for AbsoluteEvent
Source§fn cmp(&self, other: &AbsoluteEvent) -> Ordering
fn cmp(&self, other: &AbsoluteEvent) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AbsoluteEvent
impl PartialEq for AbsoluteEvent
Source§fn eq(&self, other: &AbsoluteEvent) -> bool
fn eq(&self, other: &AbsoluteEvent) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§fn ne(&self, other: &AbsoluteEvent) -> bool
fn ne(&self, other: &AbsoluteEvent) -> bool
Tests for
!=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.Source§impl PartialOrd for AbsoluteEvent
impl PartialOrd for AbsoluteEvent
impl Eq for AbsoluteEvent
Auto Trait Implementations§
impl Freeze for AbsoluteEvent
impl RefUnwindSafe for AbsoluteEvent
impl Send for AbsoluteEvent
impl Sync for AbsoluteEvent
impl Unpin for AbsoluteEvent
impl UnwindSafe for AbsoluteEvent
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