pub enum ValidationError {
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,
},
}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.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
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 moreSource§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl<'de> Deserialize<'de> for ValidationError
impl<'de> Deserialize<'de> for ValidationError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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