pub enum Object {
Silent(&'static str),
Clef {
name: Option<&'static str>,
shift: Option<&'static str>,
},
Key(&'static str),
Bar(u8),
Ending(u8),
TimeSig(i32, i64),
Tempo(i32),
Note(Member),
Rest(String),
Chord {
members: Vec<Member>,
stem_length: u8,
},
RestChord {
members: Vec<Member>,
rest: String,
},
Text(Vec<u8>, i32),
}Expand description
What an object is, as much of it as is written out.
Variants§
Silent(&'static str)
Read past and written as nothing, with music21’s type for it.
Clef
A clef by name, with its octave shift.
Fields
Key(&'static str)
A key signature’s Signature text.
Bar(u8)
A barline by its style’s number in BAR_STYLES.
Ending(u8)
An ending by its number.
TimeSig(i32, i64)
A meter’s numerator and denominator.
Tempo(i32)
A tempo in beats a minute.
Note(Member)
A note.
Rest(String)
A rest’s Dur text.
Chord
A chord’s notes, and the stem length its bytes give.
RestChord
A rest’s Dur text and the notes sounding with it.
Text(Vec<u8>, i32)
Words and their staff position.
Trait Implementations§
impl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Forget for Object
impl Freeze for Object
impl Move for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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