pub enum Line {
Lyrics(LyricsLine),
Directive(Directive),
Comment(CommentStyle, String),
Empty,
}Expand description
A single line in the song body.
ChordPro documents are processed line-by-line. Each line is classified into one of these variants by the parser.
Variants§
Lyrics(LyricsLine)
A lyrics line, possibly containing chord annotations interspersed
with text. An empty lyrics line (no text, no chords) is represented
by Line::Empty instead.
Directive(Directive)
A directive such as {title: My Song} or {start_of_chorus}.
Comment(CommentStyle, String)
A comment line from a comment directive ({comment}, {comment_italic},
{comment_box}) or a file-level # comment. The CommentStyle
distinguishes the rendering intent.
Empty
An empty line, typically used to separate paragraphs or sections.
Trait Implementations§
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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