Struct midi_file::core::NoteNumber
source · pub struct NoteNumber(/* private fields */);
Expand description
Represents the MIDI note number (C4
is 60
, for example). The minimum value is 0
,
the maximum value is 127
(i.e. u7
). This type will clamp values to the valid range.
Implementations§
Trait Implementations§
source§impl Clone for NoteNumber
impl Clone for NoteNumber
source§fn clone(&self) -> NoteNumber
fn clone(&self) -> NoteNumber
Returns a copy 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 NoteNumber
impl Debug for NoteNumber
source§impl Default for NoteNumber
impl Default for NoteNumber
source§impl Display for NoteNumber
impl Display for NoteNumber
source§impl From<NoteNumber> for u8
impl From<NoteNumber> for u8
source§fn from(value: NoteNumber) -> u8
fn from(value: NoteNumber) -> u8
Converts to this type from the input type.
source§impl From<u8> for NoteNumber
impl From<u8> for NoteNumber
source§impl Hash for NoteNumber
impl Hash for NoteNumber
source§impl Ord for NoteNumber
impl Ord for NoteNumber
source§fn cmp(&self, other: &NoteNumber) -> Ordering
fn cmp(&self, other: &NoteNumber) -> Ordering
1.21.0 · 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 PartialEq for NoteNumber
impl PartialEq for NoteNumber
source§impl PartialOrd for NoteNumber
impl PartialOrd for NoteNumber
impl Copy for NoteNumber
impl Eq for NoteNumber
impl StructuralPartialEq for NoteNumber
Auto Trait Implementations§
impl Freeze for NoteNumber
impl RefUnwindSafe for NoteNumber
impl Send for NoteNumber
impl Sync for NoteNumber
impl Unpin for NoteNumber
impl UnwindSafe for NoteNumber
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)