Enum musical_keyboard::Letter []

pub enum Letter {
    C,
    Csh,
    Db,
    D,
    Dsh,
    Eb,
    E,
    F,
    Fsh,
    Gb,
    G,
    Gsh,
    Ab,
    A,
    Ash,
    Bb,
    B,
}

The letter representation for each step in the 12-tone, equal temperament, chromatic scale.

Variants

CCshDbDDshEbEFFshGbGGshAbAAshBbB

Methods

impl Letter

fn is_black_key(&self) -> bool

Returns whether or not the note would be a black key on a standard piano or keyboard.

Trait Implementations

impl Debug for Letter

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl Clone for Letter

fn clone(&self) -> Letter

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Letter

impl PartialOrd<Letter> for Letter

fn partial_cmp(&self, other: &Letter) -> Option<Ordering>

impl Ord for Letter

fn cmp(&self, other: &Letter) -> Ordering

impl PartialEq<Letter> for Letter

fn eq(&self, other: &Letter) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Eq for Letter

impl FromPrimitive for Letter

impl ToPrimitive for Letter

fn to_i64(&self) -> Option<i64>

fn to_u64(&self) -> Option<u64>

impl Rand for Letter

fn rand<R>(rng: &mut R) -> Letter where R: Rng

impl<T> Add<T> for Letter where T: PrimInt

type Output = Letter

fn add(self, rhs: T) -> Letter

impl<T> Sub<T> for Letter where T: PrimInt

type Output = Letter

fn sub(self, rhs: T) -> Letter

impl Add<Letter> for Letter

type Output = Letter

fn add(self, rhs: Letter) -> Letter

impl Sub<Letter> for Letter

type Output = Letter

fn sub(self, rhs: Letter) -> Letter