[−][src]Enum nom_midi::KeySignature
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]
pub fn count(&self) -> u8
[src]
Count the number of sharps or flats
pub fn is_sharps(&self) -> bool
[src]
Whether there are sharps or flats
Panics
Panics if there are no sharps or flats. Use count
to check this first to avoid
pub fn for_display(&self) -> (u8, bool)
[src]
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 PartialEq<KeySignature> for KeySignature
[src]
fn eq(&self, other: &KeySignature) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for KeySignature
[src]
fn clone(&self) -> KeySignature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for KeySignature
[src]
impl Debug for KeySignature
[src]
Auto Trait Implementations
impl Unpin for KeySignature
impl Sync for KeySignature
impl Send for KeySignature
impl RefUnwindSafe for KeySignature
impl UnwindSafe for KeySignature
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,