[][src]Struct musictheory::types::Tone

pub struct Tone { /* fields omitted */ }

Tone is a Note at a specific Octave.

Methods

impl Tone[src]

pub fn from_parts(octave: Octave, note: Note) -> Tone[src]

Create a new Tone from a Note and an Octave.

pub fn note(&self) -> Note[src]

Convert a Tone into a Note.

pub fn pitch(&self) -> Pitch[src]

Convert a Tone into a Pitch.

pub fn pitch_class(&self) -> PitchClass[src]

Convert a Tone into a PitchClass.

pub fn octave(&self) -> Octave[src]

Convert a Tone into an Octave.

Trait Implementations

impl Add<Interval> for Tone[src]

type Output = Option<Self>

The resulting type after applying the + operator.

impl Clone for Tone[src]

impl Copy for Tone[src]

impl Debug for Tone[src]

impl Display for Tone[src]

impl PartialEq<Tone> for Tone[src]

impl StructuralPartialEq for Tone[src]

impl Sub<Interval> for Tone[src]

type Output = Option<Self>

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Tone

impl Send for Tone

impl Sync for Tone

impl Unpin for Tone

impl UnwindSafe for Tone

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.