[−][src]Struct musictheory::types::Steps
Steps is the distance in semitones between two PitchClasses.
Methods
impl Steps
[src]
pub fn distance(l: &PitchClass, r: &PitchClass) -> Steps
[src]
Get the distance between two PitchClasses.
pub fn cents(&self) -> Cents
[src]
pub fn value(&self) -> u16
[src]
Number of Steps.
Trait Implementations
impl Add<Steps> for Pitch
[src]
type Output = Option<Self>
The resulting type after applying the +
operator.
fn add(self, steps: Steps) -> Self::Output
[src]
impl Add<Steps> for PitchClass
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, steps: Steps) -> Self::Output
[src]
impl Clone for Steps
[src]
impl Copy for Steps
[src]
impl Debug for Steps
[src]
impl Display for Steps
[src]
impl From<Cents> for Steps
[src]
impl From<Steps> for Cents
[src]
impl From<u16> for Steps
[src]
impl PartialEq<Steps> for Steps
[src]
impl PartialOrd<Steps> for Steps
[src]
fn partial_cmp(&self, other: &Steps) -> Option<Ordering>
[src]
fn lt(&self, other: &Steps) -> bool
[src]
fn le(&self, other: &Steps) -> bool
[src]
fn gt(&self, other: &Steps) -> bool
[src]
fn ge(&self, other: &Steps) -> bool
[src]
impl StructuralPartialEq for Steps
[src]
impl Sub<Steps> for Pitch
[src]
type Output = Option<Self>
The resulting type after applying the -
operator.
fn sub(self, steps: Steps) -> Self::Output
[src]
impl Sub<Steps> for PitchClass
[src]
Auto Trait Implementations
impl RefUnwindSafe for Steps
impl Send for Steps
impl Sync for Steps
impl Unpin for Steps
impl UnwindSafe for Steps
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,