#[repr(u8)]pub enum Modifier {
Minor,
Flat5,
Augmented5,
Major7,
Dominant(Degree),
Flat9,
Sharp9,
Sharp11,
Diminished,
}
Expand description
An enum representing the modifier of a chord.
Modifiers are “special extensions” that essentially have the capacity to change how the chord is interpreted by the system. E.g., a dominant flat 9 chord is not just a dominant chord with a flat 9 extension, but rather a chord that is represented by an entirely specific scale (half/whole/half diminished).
Variants§
Minor
Minor modifier.
Flat5
Flat 5 modifier.
Augmented5
Sharp 5 modifier.
Major7
Major 7 modifier.
Dominant(Degree)
Dominant modifier with degree.
Flat9
Flat 9 modifier.
Sharp9
Sharp 9 modifier.
Sharp11
Sharp 11 modifier.
Diminished
Diminished modifier.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Modifier
impl<'de> Deserialize<'de> for Modifier
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl HasIsDominant for Modifier
impl HasIsDominant for Modifier
source§fn is_dominant(&self) -> bool
fn is_dominant(&self) -> bool
Returns whether the type (usually the modifier enum) is dominant.
source§impl HasStaticName for Modifier
impl HasStaticName for Modifier
source§fn static_name(&self) -> &'static str
fn static_name(&self) -> &'static str
Returns the static name of the type.
source§impl Ord for Modifier
impl Ord for Modifier
source§impl PartialEq for Modifier
impl PartialEq for Modifier
source§impl PartialOrd for Modifier
impl PartialOrd for Modifier
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 Modifier
impl Eq for Modifier
impl StructuralEq for Modifier
impl StructuralPartialEq for Modifier
Auto Trait Implementations§
impl RefUnwindSafe for Modifier
impl Send for Modifier
impl Sync for Modifier
impl Unpin for Modifier
impl UnwindSafe for Modifier
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more