pub struct KeySignature {
pub tonic: Pitch,
pub mode: Option<Mode>,
}
Expand description
A key signature.
Fields§
§tonic: Pitch
The tonic of the key signature.
mode: Option<Mode>
The mode of the key signature.
Implementations§
Source§impl KeySignature
impl KeySignature
Sourcepub fn new_with_mode(tonic: Pitch, mode: Option<Mode>) -> Self
pub fn new_with_mode(tonic: Pitch, mode: Option<Mode>) -> Self
Create a new key signature with a mode.
pub fn get_preferred_spelling(&self, pitch: Pitch) -> PitchSymbol
Trait Implementations§
Source§impl Clone for KeySignature
impl Clone for KeySignature
Source§fn clone(&self) -> KeySignature
fn clone(&self) -> KeySignature
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 moreAuto Trait Implementations§
impl Freeze for KeySignature
impl RefUnwindSafe for KeySignature
impl Send for KeySignature
impl Sync for KeySignature
impl Unpin for KeySignature
impl UnwindSafe for KeySignature
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