[][src]Struct musictheory::types::Steps

pub struct 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]

Cents represented by this Steps.

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.

impl Add<Steps> for PitchClass[src]

type Output = Self

The resulting type after applying the + operator.

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]

impl StructuralPartialEq for Steps[src]

impl Sub<Steps> for Pitch[src]

type Output = Option<Self>

The resulting type after applying the - operator.

impl Sub<Steps> for PitchClass[src]

type Output = Self

The resulting type after applying the - operator.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.