Struct clef::Pitch[][src]

pub struct Pitch { /* fields omitted */ }

Implementations

impl Pitch[src]

pub fn new(name: NoteName, octave: i32) -> Pitch[src]

Contracts

Pre-condition: octave must be in the range -1 to 9

  • octave >= - 1 && octave <= 9

pub fn new_with_accidental(
    name: NoteName,
    accidental: Accidental,
    octave: i32
) -> Pitch
[src]

Contracts

Pre-condition: octave must be in the range -1 to 9

  • octave >= - 1 && octave <= 9

pub fn name(&self) -> NoteName[src]

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

pub fn accidental(&self) -> Accidental[src]

Trait Implementations

impl Clone for Pitch[src]

impl Copy for Pitch[src]

impl Debug for Pitch[src]

impl Eq for Pitch[src]

impl PartialEq<Pitch> for Pitch[src]

impl StructuralEq for Pitch[src]

impl StructuralPartialEq for Pitch[src]

impl Sub<Pitch> for Pitch[src]

type Output = i32

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Pitch

impl Send for Pitch

impl Sync for Pitch

impl Unpin for Pitch

impl UnwindSafe for Pitch

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, 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.