pub enum PitchRatioError {
NonPositiveRatio,
Overflow,
UnboundedFactorization,
InvalidPrimeLimit(u32),
PrimeLimitExceeded {
remaining_numerator: u64,
remaining_denominator: u64,
prime_limit: u32,
},
ExponentOverflow,
InvalidFactorVector,
RankExponentOutOfRange {
exponent: i16,
min: i16,
max: i16,
},
DiscreteRank(String),
EmptyChord,
InvalidRootIndex {
root_index: usize,
len: usize,
},
InvalidMeanExponent,
}Expand description
Error raised by pitch-ratio validation, factoring, ranking, or approximation.
Variants§
NonPositiveRatio
Ratios must have positive numerator and denominator.
Overflow
A checked integer operation overflowed.
UnboundedFactorization
Prime-limit factorization must be explicitly bounded.
InvalidPrimeLimit(u32)
The requested prime limit is outside the supported bounded domain.
PrimeLimitExceeded
A factor remains above the configured prime limit.
Fields
ExponentOverflow
A signed exponent exceeded the represented bound.
InvalidFactorVector
A factor vector is malformed.
RankExponentOutOfRange
A rank/unrank request exceeded the finite exponent domain.
Fields
DiscreteRank(String)
Discrete mixed-radix ranking failed.
EmptyChord
A chord operation requires at least one ratio.
InvalidRootIndex
A chord root index did not identify a ratio in the chord.
InvalidMeanExponent
A generalized mean exponent must be finite and non-zero.
Trait Implementations§
Source§impl Clone for PitchRatioError
impl Clone for PitchRatioError
Source§fn clone(&self) -> PitchRatioError
fn clone(&self) -> PitchRatioError
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 PitchRatioError
impl Debug for PitchRatioError
Source§impl Display for PitchRatioError
impl Display for PitchRatioError
impl Eq for PitchRatioError
Source§impl Error for PitchRatioError
impl Error for PitchRatioError
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 From<CombError> for PitchRatioError
impl From<CombError> for PitchRatioError
Source§fn from(error: CombError) -> PitchRatioError
fn from(error: CombError) -> PitchRatioError
Converts to this type from the input type.
Source§impl PartialEq for PitchRatioError
impl PartialEq for PitchRatioError
impl StructuralPartialEq for PitchRatioError
Auto Trait Implementations§
impl Freeze for PitchRatioError
impl RefUnwindSafe for PitchRatioError
impl Send for PitchRatioError
impl Sync for PitchRatioError
impl Unpin for PitchRatioError
impl UnsafeUnpin for PitchRatioError
impl UnwindSafe for PitchRatioError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more