pub struct ChordSymbol { /* private fields */ }Expand description
Parsed chord symbol.
Implementations§
Source§impl ChordSymbol
impl ChordSymbol
Sourcepub fn parse(figure: impl Into<String>) -> Result<Self>
pub fn parse(figure: impl Into<String>) -> Result<Self>
Parses a chord symbol such as "Cmaj7", "F#m7b5", or "Bb7#11".
Sourcepub fn quality(&self) -> ChordQuality
pub fn quality(&self) -> ChordQuality
Returns the parsed chord quality.
Sourcepub fn extensions(&self) -> &[u8] ⓘ
pub fn extensions(&self) -> &[u8] ⓘ
Returns parsed extension degrees.
Sourcepub fn alterations(&self) -> &[ChordAlteration]
pub fn alterations(&self) -> &[ChordAlteration]
Returns parsed alterations.
Sourcepub fn additions(&self) -> &[ChordAlteration]
pub fn additions(&self) -> &[ChordAlteration]
Returns parsed added tones from add(...) groups.
Trait Implementations§
Source§impl Clone for ChordSymbol
impl Clone for ChordSymbol
Source§fn clone(&self) -> ChordSymbol
fn clone(&self) -> ChordSymbol
Returns a duplicate 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 ChordSymbol
impl Debug for ChordSymbol
Source§impl<'de> Deserialize<'de> for ChordSymbol
impl<'de> Deserialize<'de> for ChordSymbol
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 FromStr for ChordSymbol
impl FromStr for ChordSymbol
Source§impl PartialEq for ChordSymbol
impl PartialEq for ChordSymbol
Source§impl Serialize for ChordSymbol
impl Serialize for ChordSymbol
Source§impl TryFrom<&str> for ChordSymbol
impl TryFrom<&str> for ChordSymbol
Source§impl TryFrom<String> for ChordSymbol
impl TryFrom<String> for ChordSymbol
impl StructuralPartialEq for ChordSymbol
Auto Trait Implementations§
impl Freeze for ChordSymbol
impl RefUnwindSafe for ChordSymbol
impl Send for ChordSymbol
impl Sync for ChordSymbol
impl Unpin for ChordSymbol
impl UnsafeUnpin for ChordSymbol
impl UnwindSafe for ChordSymbol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more