Enum midi_msg::Meta

source ·
pub enum Meta {
Show 16 variants SequenceNumber(u16), Text(String), Copyright(String), TrackName(String), InstrumentName(String), Lyric(String), Marker(String), CuePoint(String), ChannelPrefix(Channel), EndOfTrack, SetTempo(u32), SmpteOffset(HighResTimeCode), TimeSignature(FileTimeSignature), KeySignature(KeySignature), SequencerSpecific(Vec<u8>), Unknown { meta_type: u8, data: Vec<u8>, },
}
Expand description

A meta event in a Standard Midi File

Variants§

§

SequenceNumber(u16)

Must occur at the start of a track, and specifies the sequence number of the track. In a MultiSong file, this is the “pattern” number that identifies the song for cueing purposes.

§

Text(String)

Any text, describing anything

§

Copyright(String)

A copyright notice

§

TrackName(String)

The name of the track

§

InstrumentName(String)

The name of the instrument used in the track

§

Lyric(String)

A lyric. See RP-017 for guidance on the use of this meta event.

§

Marker(String)

Normally only used in a SingleTrack file, or the first track of a MultiTrack file. Used to mark significant points in the music.

§

CuePoint(String)

A description of something happening at a point in time

§

ChannelPrefix(Channel)

The MIDI channel that the following track events are intended for. Effective until the next event that specifies a channel.

§

EndOfTrack

Marks the end of a track. This event is not optional. It must be the last event in every track.

§

SetTempo(u32)

The tempo in microseconds per quarter note.

§

SmpteOffset(HighResTimeCode)

If present, the time at which the track is supposed to start. Should be present at the start of the track.

§

TimeSignature(FileTimeSignature)

A time signature.

§

KeySignature(KeySignature)

A key signature.

§

SequencerSpecific(Vec<u8>)

A chunk of data that is specific to the sequencer that created the file.

§

Unknown

Any other meta event that is not recognized

Fields

§meta_type: u8
§data: Vec<u8>

Trait Implementations§

source§

impl Clone for Meta

source§

fn clone(&self) -> Meta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Meta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Meta

source§

fn eq(&self, other: &Meta) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Meta

Auto Trait Implementations§

§

impl Freeze for Meta

§

impl RefUnwindSafe for Meta

§

impl Send for Meta

§

impl Sync for Meta

§

impl Unpin for Meta

§

impl UnwindSafe for Meta

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.