pub enum Source<'a> {
Program(u8),
TrackName(&'a str),
InstrumentName(&'a str),
OtherName(&'a str),
Nothing,
}Expand description
What an instrument is read from: music21’s midiEventToInstrument.
Variants§
Program(u8)
A program change’s program.
TrackName(&'a str)
A name, decoded, from a track-name meta event.
InstrumentName(&'a str)
A name, decoded, from an instrument-name meta event.
OtherName(&'a str)
A name from any other event.
Nothing
Nothing an instrument can be told from.
Trait Implementations§
impl<'a> Copy for Source<'a>
impl<'a> Eq for Source<'a>
impl<'a> StructuralPartialEq for Source<'a>
Auto Trait Implementations§
impl<'a> Forget for Source<'a>
impl<'a> Freeze for Source<'a>
impl<'a> Move for Source<'a>
impl<'a> RefUnwindSafe for Source<'a>
impl<'a> Send for Source<'a>
impl<'a> Sync for Source<'a>
impl<'a> Unpin for Source<'a>
impl<'a> UnsafeUnpin for Source<'a>
impl<'a> UnwindSafe for Source<'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