pub enum Accidental {
None,
DoubleFlat,
Flat,
Natural,
Sharp,
DoubleSharp,
}Expand description
Represents an accidental.
§Examples
use note_pen::prelude::*;
let sharp = Accidental::Sharp;
let note = Note::new(Alphabet::A, sharp, 4);
let next_note = sharp + note;
assert_eq!(next_note, Note::new(Alphabet::A, Accidental::DoubleSharp, 4));
assert_eq!(sharp + note, Note::new(Alphabet::B, Accidental::default(), 4));Variants§
Implementations§
Trait Implementations§
Source§impl Add<Note> for Accidental
impl Add<Note> for Accidental
Source§impl Clone for Accidental
impl Clone for Accidental
Source§fn clone(&self) -> Accidental
fn clone(&self) -> Accidental
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 Accidental
impl Debug for Accidental
Source§impl Default for Accidental
impl Default for Accidental
Source§impl Hash for Accidental
impl Hash for Accidental
Source§impl PartialEq for Accidental
impl PartialEq for Accidental
impl Copy for Accidental
impl Eq for Accidental
impl StructuralPartialEq for Accidental
Auto Trait Implementations§
impl Freeze for Accidental
impl RefUnwindSafe for Accidental
impl Send for Accidental
impl Sync for Accidental
impl Unpin for Accidental
impl UnwindSafe for Accidental
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