pub struct PitchClassAlphabet { /* private fields */ }Expand description
The stable twelve-symbol alphabet of canonical PitchClass values.
Construction delegates uniqueness and stable-id validation to
FiniteAlphabet. The order is the canonical numeric order C = 0 through
B = 11; no spelling aliases or private pitch representation are introduced.
Implementations§
Source§impl PitchClassAlphabet
impl PitchClassAlphabet
Sourcepub fn try_new() -> Result<Self, AlphabetError>
pub fn try_new() -> Result<Self, AlphabetError>
Constructs the canonical pitch-class alphabet.
Sourcepub fn id(&self) -> &AlphabetId
pub fn id(&self) -> &AlphabetId
Returns the stable alphabet identity.
Sourcepub fn classes(&self) -> &[PitchClass]
pub fn classes(&self) -> &[PitchClass]
Returns all twelve canonical classes in numeric order.
Trait Implementations§
Source§impl Clone for PitchClassAlphabet
impl Clone for PitchClassAlphabet
Source§fn clone(&self) -> PitchClassAlphabet
fn clone(&self) -> PitchClassAlphabet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PitchClassAlphabet
impl Debug for PitchClassAlphabet
impl Eq for PitchClassAlphabet
Source§impl PartialEq for PitchClassAlphabet
impl PartialEq for PitchClassAlphabet
Source§impl SerialAlphabet for PitchClassAlphabet
impl SerialAlphabet for PitchClassAlphabet
impl StructuralPartialEq for PitchClassAlphabet
Auto Trait Implementations§
impl Freeze for PitchClassAlphabet
impl RefUnwindSafe for PitchClassAlphabet
impl Send for PitchClassAlphabet
impl Sync for PitchClassAlphabet
impl Unpin for PitchClassAlphabet
impl UnsafeUnpin for PitchClassAlphabet
impl UnwindSafe for PitchClassAlphabet
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