Enum gabc_parser::NoteElem[][src]

pub enum NoteElem<'a> {
    Spacer(&'a str),
    Barline(&'a str),
    Note(Note<'a>),
}

Any element that can appear in the music for a given syllable, including bars (e.g. ":"), separators (e.g. "/"), and Notes

Variants

Methods

impl<'a> NoteElem<'a>
[src]

Get the Lilypond representation of this note element. gabc spacers (e.g. "/") are ignored; Note suffixes (e.g. ".") that have Lilypond equivalents are not yet implemented.

let n = NoteElem::Note(Note::new("h..", "c1"));
assert_eq!(n.to_ly(), "g'");
let s = NoteElem::Spacer("/");
assert_eq!(s.to_ly(), "");
let b = NoteElem::Barline(":");
assert_eq!(b.to_ly(), "\\divisioMaior");

Trait Implementations

impl<'a> Debug for NoteElem<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for NoteElem<'a>

impl<'a> Sync for NoteElem<'a>