pub enum ValidationError {
Show 14 variants
EmptyScore,
PartWithoutStaves {
part: usize,
},
StaffWithoutMeasures {
part: usize,
staff: usize,
},
MeasureCountMismatch {
part: usize,
staff: usize,
expected: usize,
found: usize,
},
InvalidTimeSignature {
part: usize,
staff: usize,
measure: usize,
numerator: u8,
denominator: u8,
},
BeatCount {
part: usize,
staff: usize,
measure: usize,
voice: usize,
expected_beats: f64,
found_beats: f64,
},
OutOfRange {
part_index: usize,
staff_index: usize,
measure_index: usize,
note_index: usize,
pitch_midi: u8,
instrument_range: (u8, u8),
},
InvalidTablature {
part: usize,
staff: usize,
reason: TablatureValidationReason,
},
TabPositionOutOfRange {
part: usize,
staff: usize,
measure: usize,
voice: usize,
note: usize,
string: u8,
lines: u8,
},
MicrotoneOutOfRange {
part: usize,
staff: usize,
measure: usize,
voice: usize,
note: usize,
pitch: usize,
microtone_cents: i16,
},
InvalidHarmonyRange {
part: usize,
staff: usize,
measure: usize,
voice: usize,
note: usize,
end: NoteAddr,
},
InvalidSpannerId {
index: usize,
id: String,
},
DuplicateSpannerId {
first: usize,
duplicate: usize,
id: String,
},
InvalidSpannerEndpoint {
index: usize,
id: String,
kind: NotationSpannerKind,
endpoint: SpannerEndpoint,
address: NoteAddr,
},
}Expand description
A structural error found by validate.
Variants§
EmptyScore
The score has no parts to validate.
PartWithoutStaves
A part has no staves.
StaffWithoutMeasures
A staff has no measures.
MeasureCountMismatch
Staves in one part do not cover the same number of measures.
InvalidTimeSignature
A time signature has an unsupported numerator or denominator.
BeatCount
Beat-count mismatch: the notes in a voice don’t fill the time signature.
OutOfRange
A note pitch lies outside the practical range for the part’s GM instrument.
Fields
InvalidTablature
Tablature staff metadata is internally inconsistent.
TabPositionOutOfRange
A note’s explicit string is not present on its tablature staff.
MicrotoneOutOfRange
A pitch’s microtonal cents component is outside the canonical -99..99 range.
Fields
InvalidHarmonyRange
A harmony continuation points to a note address that does not exist.
InvalidSpannerId
A typed notation span must have a non-empty unique stable identity.
DuplicateSpannerId
A typed notation span has a duplicate stable identity.
InvalidSpannerEndpoint
A typed notation span endpoint does not point to a canonical note.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more