Struct midly::TrackEvent
source · 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 copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
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<TrackEvent<'a>> for TrackEvent<'a>
impl<'a> PartialEq<TrackEvent<'a>> for TrackEvent<'a>
source§fn eq(&self, other: &TrackEvent<'a>) -> bool
fn eq(&self, other: &TrackEvent<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.