Enum music_theory::theory::chord::ChordStyle
source · pub enum ChordStyle {
Std(MStyle, EStyle),
Extra(MStyle, EStyle),
Spelled,
}
Expand description
Style that determines how a chord will be formatted or styled
Example:
use music_theory::theory::*;
let std = ChordStyle::Std(MStyle::Symbol, EStyle::Symbol);
assert_eq!(&Chord::new(&MINOR_MAJOR_SEVENTH).as_string(std), "X-Δ");
Variants§
Std(MStyle, EStyle)
Only use standard base chord variants
Extra(MStyle, EStyle)
Use some extra base chord variants
Spelled
Spell out the chord in terms of intervals
Trait Implementations§
source§impl Clone for ChordStyle
impl Clone for ChordStyle
source§fn clone(&self) -> ChordStyle
fn clone(&self) -> ChordStyle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChordStyle
impl Debug for ChordStyle
source§impl Hash for ChordStyle
impl Hash for ChordStyle
source§impl Ord for ChordStyle
impl Ord for ChordStyle
source§fn cmp(&self, other: &ChordStyle) -> Ordering
fn cmp(&self, other: &ChordStyle) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ChordStyle
impl PartialEq for ChordStyle
source§fn eq(&self, other: &ChordStyle) -> bool
fn eq(&self, other: &ChordStyle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChordStyle
impl PartialOrd for ChordStyle
source§fn partial_cmp(&self, other: &ChordStyle) -> Option<Ordering>
fn partial_cmp(&self, other: &ChordStyle) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ChordStyle
impl Eq for ChordStyle
impl StructuralPartialEq for ChordStyle
Auto Trait Implementations§
impl Freeze for ChordStyle
impl RefUnwindSafe for ChordStyle
impl Send for ChordStyle
impl Sync for ChordStyle
impl Unpin for ChordStyle
impl UnwindSafe for ChordStyle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more