pub struct NoteName { /* private fields */ }Implementations§
Source§impl NoteName
impl NoteName
pub fn new(value: impl AsRef<str>) -> Result<Self, NoteError>
pub fn as_str(&self) -> &str
pub fn value(&self) -> &str
pub const fn letter(&self) -> NoteLetter
pub const fn accidental(&self) -> Accidental
pub const fn octave(&self) -> Option<Octave>
pub const fn note_class(&self) -> NoteClass
Trait Implementations§
Source§impl Ord for NoteName
impl Ord for NoteName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for NoteName
impl PartialOrd for NoteName
impl Eq for NoteName
impl StructuralPartialEq for NoteName
Auto Trait Implementations§
impl Freeze for NoteName
impl RefUnwindSafe for NoteName
impl Send for NoteName
impl Sync for NoteName
impl Unpin for NoteName
impl UnsafeUnpin for NoteName
impl UnwindSafe for NoteName
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