pub struct Note { /* private fields */ }
Expand description
Not yet resolved Note, constructed by MIDI.
Implementations§
Source§impl Note
impl Note
pub fn from_midi(midi: u8, accidental: Option<Accidental>) -> Self
pub fn resolve(&self, key: Key) -> ResolvedNote
pub fn midi(&self) -> u8
pub fn set_midi(&mut self, midi: u8)
pub fn accidental(&self) -> Option<Accidental>
pub fn set_accidental(&mut self, accidental: Option<Accidental>)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Note
impl<'de> Deserialize<'de> for Note
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ResolvedNote> for Note
impl From<ResolvedNote> for Note
Source§fn from(value: ResolvedNote) -> Self
fn from(value: ResolvedNote) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for Note
impl PartialOrd for Note
impl Copy 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