pub struct NotationCodec;Expand description
Codec converting between a Score and its LilyPond-subset text rendering.
Acts as the stateless entry point for the notation surface; each method delegates to the import or export pipeline.
Implementations§
Source§impl NotationCodec
impl NotationCodec
Sourcepub fn export_lilypond_report(
&self,
score: &Score,
) -> Result<NotationReport<String>, NotationError>
pub fn export_lilypond_report( &self, score: &Score, ) -> Result<NotationReport<String>, NotationError>
Exports a score to LilyPond text, returning the rendering with diagnostics.
Sourcepub fn export_lilypond(&self, score: &Score) -> Result<String, NotationError>
pub fn export_lilypond(&self, score: &Score) -> Result<String, NotationError>
Exports a score to LilyPond text, discarding diagnostics.
Sourcepub fn import_lilypond_report(
&self,
source: &str,
) -> Result<NotationReport<Score>, NotationError>
pub fn import_lilypond_report( &self, source: &str, ) -> Result<NotationReport<Score>, NotationError>
Imports a score from LilyPond text, returning the score with diagnostics.
Sourcepub fn import_lilypond(&self, source: &str) -> Result<Score, NotationError>
pub fn import_lilypond(&self, source: &str) -> Result<Score, NotationError>
Imports a score from LilyPond text, discarding diagnostics.
Trait Implementations§
Source§impl Clone for NotationCodec
impl Clone for NotationCodec
Source§fn clone(&self) -> NotationCodec
fn clone(&self) -> NotationCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NotationCodec
Source§impl Debug for NotationCodec
impl Debug for NotationCodec
Source§impl Default for NotationCodec
impl Default for NotationCodec
Source§fn default() -> NotationCodec
fn default() -> NotationCodec
Returns the “default value” for a type. Read more
impl Eq for NotationCodec
Source§impl PartialEq for NotationCodec
impl PartialEq for NotationCodec
Source§fn eq(&self, other: &NotationCodec) -> bool
fn eq(&self, other: &NotationCodec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NotationCodec
Auto Trait Implementations§
impl Freeze for NotationCodec
impl RefUnwindSafe for NotationCodec
impl Send for NotationCodec
impl Sync for NotationCodec
impl Unpin for NotationCodec
impl UnsafeUnpin for NotationCodec
impl UnwindSafe for NotationCodec
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