pub enum ScalaDegree {
Ratio(Fraction),
Cents(FloatType),
}Expand description
A single degree of a ScalaScale.
Scala files express each degree either as an exact ratio (3/2) or as a
cents value (701.955). The distinction is preserved rather than collapsed,
because a ratio carries exactness that cents cannot express.
Variants§
Ratio(Fraction)
An exact integer ratio, such as 3/2.
Cents(FloatType)
A cents value above the scale root, such as 701.955.
Implementations§
Source§impl ScalaDegree
impl ScalaDegree
Trait Implementations§
Source§impl Clone for ScalaDegree
impl Clone for ScalaDegree
Source§fn clone(&self) -> ScalaDegree
fn clone(&self) -> ScalaDegree
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 moreimpl Copy for ScalaDegree
Source§impl Debug for ScalaDegree
impl Debug for ScalaDegree
Source§impl Display for ScalaDegree
impl Display for ScalaDegree
Source§impl PartialEq for ScalaDegree
impl PartialEq for ScalaDegree
Source§fn eq(&self, other: &ScalaDegree) -> bool
fn eq(&self, other: &ScalaDegree) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ScalaDegree
Auto Trait Implementations§
impl Freeze for ScalaDegree
impl RefUnwindSafe for ScalaDegree
impl Send for ScalaDegree
impl Sync for ScalaDegree
impl Unpin for ScalaDegree
impl UnsafeUnpin for ScalaDegree
impl UnwindSafe for ScalaDegree
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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