Enum abc_parser::datatypes::MusicSymbol [−][src]
pub enum MusicSymbol {
Note {
decoration: Option<Decoration>,
accidental: Option<Accidental>,
note: char,
octave: i8,
length: f32,
},
Chord {
decoration: Option<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
NoteFields of Note
decoration: Option<Decoration> | |
accidental: Option<Accidental> | |
note: char | |
octave: i8 | |
length: f32 |
ChordFields of Chord
decoration: Option<Decoration> | |
notes: Vec<MusicSymbol> | |
length: f32 |
GraceNotesFields of GraceNotes
acciaccatura: Option<()> | |
notes: Vec<MusicSymbol> |
TupletAn r value of 0 indicates that the parser does not have enough information and it must
be determined from the time signature.
Fields of Tuplet
p: u32 | |
q: u32 | |
r: u32 | |
notes: Vec<MusicSymbol> |
Bar(String)Rest(Rest)Ending(u32)VisualBreak()
Methods
impl MusicSymbol[src]
impl MusicSymbolpub fn new_note(
decoration: Option<Decoration>,
accidental: Option<Accidental>,
note: char,
octave: i8,
length: f32
) -> MusicSymbol[src]
pub fn new_note(
decoration: Option<Decoration>,
accidental: Option<Accidental>,
note: char,
octave: i8,
length: f32
) -> MusicSymbolpub fn note(note: char) -> MusicSymbol[src]
pub fn note(note: char) -> MusicSymbolpub fn note_from_length(note: char, length: f32) -> MusicSymbol[src]
pub fn note_from_length(note: char, length: f32) -> MusicSymbolpub fn tuplet_with_defaults(
p: u32,
q: Option<u32>,
r: Option<u32>,
notes: Vec<MusicSymbol>
) -> Result<MusicSymbol, &'static str>[src]
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>[src]
pub fn new_tuplet(
p: u32,
q: u32,
r: u32,
notes: Vec<MusicSymbol>
) -> Result<MusicSymbol, &'static str>Trait Implementations
impl ToABC for MusicSymbol[src]
impl ToABC for MusicSymbolimpl Debug for MusicSymbol[src]
impl Debug for MusicSymbolfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for MusicSymbol[src]
impl PartialEq for MusicSymbolfn eq(&self, other: &MusicSymbol) -> bool[src]
fn eq(&self, other: &MusicSymbol) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &MusicSymbol) -> bool[src]
fn ne(&self, other: &MusicSymbol) -> boolThis method tests for !=.
Auto Trait Implementations
impl Send for MusicSymbol
impl Send for MusicSymbolimpl Sync for MusicSymbol
impl Sync for MusicSymbol