pub struct TrackEvent<'a> {
pub delta: u28,
pub kind: TrackEventKind<'a>,
}
Expand description
Represents a parsed SMF track event.
Consists of a delta time (in MIDI ticks relative to the previous event) and the actual track event.
Fields§
§delta: u28
How many MIDI ticks after the previous event should this event fire.
kind: TrackEventKind<'a>
The type of event along with event-specific data.
Implementations§
Source§impl<'a> TrackEvent<'a>
impl<'a> TrackEvent<'a>
Sourcepub fn to_static(&self) -> TrackEvent<'static>
pub fn to_static(&self) -> TrackEvent<'static>
Remove any lifetimed data from this event to create a TrackEvent
with 'static
lifetime that can be stored and moved everywhere, solving borrow checker issues.
WARNING: Any bytestrings in the input will be replaced by empty bytestrings.
Trait Implementations§
Source§impl<'a> Clone for TrackEvent<'a>
impl<'a> Clone for TrackEvent<'a>
Source§fn clone(&self) -> TrackEvent<'a>
fn clone(&self) -> TrackEvent<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for TrackEvent<'a>
impl<'a> Debug for TrackEvent<'a>
Source§impl<'a> Hash for TrackEvent<'a>
impl<'a> Hash for TrackEvent<'a>
Source§impl<'a> PartialEq for TrackEvent<'a>
impl<'a> PartialEq for TrackEvent<'a>
impl<'a> Copy for TrackEvent<'a>
impl<'a> Eq for TrackEvent<'a>
impl<'a> StructuralPartialEq for TrackEvent<'a>
Auto Trait Implementations§
impl<'a> Freeze for TrackEvent<'a>
impl<'a> RefUnwindSafe for TrackEvent<'a>
impl<'a> Send for TrackEvent<'a>
impl<'a> Sync for TrackEvent<'a>
impl<'a> Unpin for TrackEvent<'a>
impl<'a> UnwindSafe for TrackEvent<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more