pub enum TuningError {
Show 13 variants
ParseError(String),
InvalidTone,
InvalidNoteCount,
TooFewNotes,
TuningUnmappedKey,
MappingLongerThanScale,
FileError,
ZeroSpan,
NonPositiveCents,
ZeroSteps,
IncompleteKBM,
IncompleteSCL,
InvalidKeyCount,
}
Expand description
Errors
Variants§
ParseError(String)
Error parsing an SCL/KBM file/string.
InvalidTone
Tone is a ratio with either denominator or numerator equal to 0.
InvalidNoteCount
Number of notes is less then 1 or not equal to listed notes.
TooFewNotes
Scale contains no notes.
TuningUnmappedKey
Tuning attemped to tune unmapped key.
MappingLongerThanScale
Mapping is longer than scale.
FileError
Error reading the file.
ZeroSpan
Cannot divide zero span.
NonPositiveCents
Cannot divide non-positive cents amount.
ZeroSteps
Cannot divide into zero steps.
IncompleteKBM
Incomplete KBM file.
IncompleteSCL
Incomplete SCL file.
InvalidKeyCount
Given amount of keys is not equal to number of listed keys.
Trait Implementations§
Source§impl Debug for TuningError
impl Debug for TuningError
Source§impl Display for TuningError
impl Display for TuningError
Source§impl Error for TuningError
impl Error for TuningError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for TuningError
impl RefUnwindSafe for TuningError
impl Send for TuningError
impl Sync for TuningError
impl Unpin for TuningError
impl UnwindSafe for TuningError
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