pub enum RenderError {
Show 14 variants
EmptyScore,
InvalidRow {
row: usize,
},
ViewResolution {
view_id: String,
reason: String,
},
InvalidLayout {
reason: String,
},
InvalidOptions {
reason: String,
},
UnsupportedClef,
UnsupportedAccidental {
alter: i8,
},
InvalidTabPosition {
string: u8,
lines: u8,
},
TabMetricsOverflow,
MeasureTextTooLarge {
size: usize,
},
InvalidMeasureTextOffset {
field: &'static str,
},
InvalidNotePlacement {
field: &'static str,
},
InvalidXmlCharacter {
codepoint: u32,
},
Annotation(RenderAnnotationError),
}Expand description
Errors returned by render_svg / render_svg_with_layout.
These are all system-boundary validation failures — an arbitrary Score can reference
notation this renderer does not (yet) support. Never fails silently: unsupported notation or
an accidental beyond double-sharp/double-flat is reported, not dropped or approximated.
Variants§
EmptyScore
The score has no staves to render (no parts, or no parts with staves).
InvalidRow
A requested system row does not exist in the supplied layout.
ViewResolution
A linked score view could not be resolved to a renderable score snapshot.
InvalidLayout
The score and precomputed layout do not have compatible indices.
InvalidOptions
Rendering dimensions or system settings are not finite and positive.
UnsupportedClef
A staff uses a clef this renderer has no staff-position mapping for.
UnsupportedAccidental
A pitch’s alter is outside the supported range (-2..=2: double-flat..double-sharp).
InvalidTabPosition
A tablature position cannot be represented by the owning staff.
TabMetricsOverflow
Tablature glyph metrics overflowed before SVG emission.
MeasureTextTooLarge
A measure-level styled text entry exceeds the bounded renderer input size.
InvalidMeasureTextOffset
A measure-level styled text offset is not finite or cannot fit SVG coordinates.
InvalidNotePlacement
A note-level MusicXML placement offset is not finite or cannot fit SVG coordinates.
InvalidXmlCharacter
A score text contains a character that XML 1.0 cannot represent.
Annotation(RenderAnnotationError)
Host-provided annotation validation failed.
Trait Implementations§
Source§impl Clone for RenderError
impl Clone for RenderError
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
impl Eq for RenderError
Source§impl Error for RenderError
impl Error for RenderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()