Enum nom_midi::KeySignature
[−]
[src]
pub enum KeySignature { 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, }
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
Methods
impl KeySignature
[src]
fn count(&self) -> u8
Count the number of sharps or flats
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
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
impl Debug for KeySignature
[src]
impl PartialEq for KeySignature
[src]
fn eq(&self, __arg_0: &KeySignature) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Copy for KeySignature
[src]
impl Clone for KeySignature
[src]
fn clone(&self) -> KeySignature
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more