pub enum MusicSymbol {
Note {
decorations: Vec<Decoration>,
accidental: Option<Accidental>,
note: Note,
octave: i8,
length: f32,
tie: Option<Tie>,
},
Chord {
decorations: Vec<Decoration>,
notes: Vec<MusicSymbol>,
length: f32,
},
GraceNotes {
acciaccatura: Option<()>,
notes: Vec<MusicSymbol>,
},
Tuplet {
p: u32,
q: u32,
r: u32,
notes: Vec<MusicSymbol>,
},
Bar(String),
Rest(Rest),
Ending(u32),
VisualBreak,
}
Variants§
Note
Chord
GraceNotes
Tuplet
An r
value of 0 indicates that the parser does not have enough information and it must
be determined from the time signature.
Bar(String)
Rest(Rest)
Ending(u32)
VisualBreak
Implementations§
Source§impl MusicSymbol
impl MusicSymbol
pub fn new_note( decorations: Vec<Decoration>, accidental: Option<Accidental>, note: Note, octave: i8, length: f32, tie: Option<Tie>, ) -> MusicSymbol
pub fn note(note: Note) -> MusicSymbol
pub fn note_from_length(note: Note, length: f32) -> MusicSymbol
Sourcepub fn tuplet_with_defaults(
p: u32,
q: Option<u32>,
r: Option<u32>,
notes: Vec<MusicSymbol>,
) -> Result<MusicSymbol, &'static str>
pub fn tuplet_with_defaults( p: u32, q: Option<u32>, r: Option<u32>, notes: Vec<MusicSymbol>, ) -> Result<MusicSymbol, &'static str>
§Panics
If the number of notes is not equal to p
pub fn new_tuplet( p: u32, q: u32, r: u32, notes: Vec<MusicSymbol>, ) -> Result<MusicSymbol, &'static str>
Trait Implementations§
Source§impl Clone for MusicSymbol
impl Clone for MusicSymbol
Source§fn clone(&self) -> MusicSymbol
fn clone(&self) -> MusicSymbol
Returns a duplicate 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 Debug for MusicSymbol
impl Debug for MusicSymbol
Source§impl PartialEq for MusicSymbol
impl PartialEq for MusicSymbol
Source§impl ToABC for MusicSymbol
impl ToABC for MusicSymbol
impl StructuralPartialEq for MusicSymbol
Auto Trait Implementations§
impl Freeze for MusicSymbol
impl RefUnwindSafe for MusicSymbol
impl Send for MusicSymbol
impl Sync for MusicSymbol
impl Unpin for MusicSymbol
impl UnwindSafe for MusicSymbol
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