pub enum PitchScaleError {
PitchClassOutOfScale(u8),
EmptyScale,
InvalidScaleInterval(u8),
InvalidScaleDegree(usize),
}Expand description
Error returned when a scale operation fails or a scale cannot be constructed.
Variants§
PitchClassOutOfScale(u8)
A pitch class was requested as a scale degree but is not part of the scale.
EmptyScale
A custom scale was built from an empty interval list.
InvalidScaleInterval(u8)
A custom scale interval fell outside the valid 0..12 semitone range.
InvalidScaleDegree(usize)
A one-based scale degree was zero or otherwise unsupported.
Trait Implementations§
Source§impl Clone for PitchScaleError
impl Clone for PitchScaleError
Source§fn clone(&self) -> PitchScaleError
fn clone(&self) -> PitchScaleError
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 PitchScaleError
impl Debug for PitchScaleError
Source§impl Display for PitchScaleError
impl Display for PitchScaleError
impl Eq for PitchScaleError
Source§impl Error for PitchScaleError
impl Error for PitchScaleError
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()
Source§impl PartialEq for PitchScaleError
impl PartialEq for PitchScaleError
impl StructuralPartialEq for PitchScaleError
Auto Trait Implementations§
impl Freeze for PitchScaleError
impl RefUnwindSafe for PitchScaleError
impl Send for PitchScaleError
impl Sync for PitchScaleError
impl Unpin for PitchScaleError
impl UnsafeUnpin for PitchScaleError
impl UnwindSafe for PitchScaleError
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