Enum gabc_parser::NoteElem[][src]

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

Any element that can appear in a gabc music string.

Variants

A gabc spacer, e.g. "/"

A gabc bar separator, e.g. "::"

A Note struct

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.

Examples

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>