pub enum Note {
C,
CSharp,
D,
DSharp,
E,
F,
FSharp,
G,
GSharp,
A,
ASharp,
B,
}Expand description
Variants§
Implementations§
Source§impl Note
impl Note
Sourcepub fn is_sharp(&self) -> bool
pub fn is_sharp(&self) -> bool
Returns true if the note type is sharp. Same as is_flat
§Example
let note = Note::C;
assert!(!note.is_sharp());
let note = Note::FSharp;
assert!(note.is_sharp());Sourcepub fn is_flat(&self) -> bool
pub fn is_flat(&self) -> bool
Returns true if the note type is flat. Same as is_sharp
§Example
let note = Note::A;
assert!(!note.is_flat());
let note = Note::CSharp;
assert!(note.is_flat());Sourcepub fn from_data_byte(key: &DataByte) -> Self
pub fn from_data_byte(key: &DataByte) -> Self
Identify the note from a key byte.
Trait Implementations§
impl Copy for Note
impl Eq for Note
impl StructuralPartialEq for Note
Auto Trait Implementations§
impl Freeze for Note
impl RefUnwindSafe for Note
impl Send for Note
impl Sync for Note
impl Unpin for Note
impl UnwindSafe for Note
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