Struct helgoboss_midi::KeyNumber
source · [−]pub struct KeyNumber(_);
Expand description
A key number (0 - 127), e.g. of a MIDI Note On message.
Implementations
sourceimpl KeyNumber
impl KeyNumber
sourcepub const MIN: KeyNumber = KeyNumber(0)
pub const MIN: KeyNumber = KeyNumber(0)
The smallest value that can be represented by this type.
sourcepub const MAX: KeyNumber = KeyNumber(127)
pub const MAX: KeyNumber = KeyNumber(127)
The largest value that can be represented by this type.
sourcepub const unsafe fn new_unchecked(value: u8) -> KeyNumber
pub const unsafe fn new_unchecked(value: u8) -> KeyNumber
Trait Implementations
sourceimpl Ord for KeyNumber
impl Ord for KeyNumber
sourceimpl PartialOrd<KeyNumber> for KeyNumber
impl PartialOrd<KeyNumber> for KeyNumber
sourcefn partial_cmp(&self, other: &KeyNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyNumber) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for KeyNumber
impl Eq for KeyNumber
impl StructuralEq for KeyNumber
impl StructuralPartialEq for KeyNumber
Auto Trait Implementations
impl RefUnwindSafe for KeyNumber
impl Send for KeyNumber
impl Sync for KeyNumber
impl Unpin for KeyNumber
impl UnwindSafe for KeyNumber
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more