pub enum KeySignature {
Show 30 variants
CMajor,
GMajor,
DMajor,
AMajor,
EMajor,
BMajor,
FSharpMajor,
CSharpMajor,
FMajor,
BFlatMajor,
EFlatMajor,
AFlatMajor,
DFlatMajor,
GFlatMajor,
CFlatMajor,
AMinor,
EMinor,
BMinor,
FSharpMinor,
CSharpMinor,
GSharpMinor,
DSharpMinor,
ASharpMinor,
DMinor,
GMinor,
CMinor,
FMinor,
BFlatMinor,
EFlatMinor,
AFlatMinor,
}
Expand description
All possible Key Signatures
Variants§
CMajor
GMajor
DMajor
AMajor
EMajor
BMajor
FSharpMajor
CSharpMajor
FMajor
BFlatMajor
EFlatMajor
AFlatMajor
DFlatMajor
GFlatMajor
CFlatMajor
AMinor
EMinor
BMinor
FSharpMinor
CSharpMinor
GSharpMinor
DSharpMinor
ASharpMinor
DMinor
GMinor
CMinor
FMinor
BFlatMinor
EFlatMinor
AFlatMinor
Implementations§
Source§impl KeySignature
impl KeySignature
Sourcepub fn is_sharps(&self) -> bool
pub fn is_sharps(&self) -> bool
Whether there are sharps or flats
§Panics
Panics if there are no sharps or flats. Use count
to check this first to avoid
Sourcepub fn for_display(&self) -> (u8, bool)
pub fn for_display(&self) -> (u8, bool)
Get a tuple of the number of sharps/flats, and a bool that is true for sharps, false for flats.
The second value is not specified (could be anything) when the first is 0.
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 moreSource§impl Debug for KeySignature
impl Debug for KeySignature
Source§impl PartialEq for KeySignature
impl PartialEq for KeySignature
impl Copy for KeySignature
impl StructuralPartialEq for KeySignature
Auto 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