Struct helgoboss_midi::ControllerNumber
source · [−]pub struct ControllerNumber(_);
Expand description
A controller number (0 - 127) of a MIDI Control Change message.
Implementations
sourceimpl ControllerNumber
impl ControllerNumber
sourcepub const MIN: ControllerNumber = ControllerNumber(0)
pub const MIN: ControllerNumber = ControllerNumber(0)
The smallest value that can be represented by this type.
sourcepub const MAX: ControllerNumber = ControllerNumber(127)
pub const MAX: ControllerNumber = ControllerNumber(127)
The largest value that can be represented by this type.
sourcepub fn new(value: u8) -> ControllerNumber
pub fn new(value: u8) -> ControllerNumber
sourcepub const unsafe fn new_unchecked(value: u8) -> ControllerNumber
pub const unsafe fn new_unchecked(value: u8) -> ControllerNumber
sourceimpl ControllerNumber
impl ControllerNumber
sourcepub fn can_be_part_of_14_bit_control_change_message(&self) -> bool
pub fn can_be_part_of_14_bit_control_change_message(&self) -> bool
Returns whether this controller number can be used to make up a 14-bit Control Change message.
sourcepub fn corresponding_14_bit_lsb_controller_number(
&self
) -> Option<ControllerNumber>
pub fn corresponding_14_bit_lsb_controller_number(
&self
) -> Option<ControllerNumber>
If this controller number can be used to send the most significant byte of a 14-bit Control Change message, this function returns the corresponding controller number that would be used to send the least significant byte of it.
sourcepub fn is_parameter_number_message_controller_number(&self) -> bool
pub fn is_parameter_number_message_controller_number(&self) -> bool
Returns whether this controller number is intended to be used to send part of a (N)RPN message.
sourcepub fn is_channel_mode_message_controller_number(&self) -> bool
pub fn is_channel_mode_message_controller_number(&self) -> bool
Returns whether this controller number is intended to be used to send Channel Mode messages.
Trait Implementations
sourceimpl Clone for ControllerNumber
impl Clone for ControllerNumber
sourcefn clone(&self) -> ControllerNumber
fn clone(&self) -> ControllerNumber
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ControllerNumber
impl Debug for ControllerNumber
sourceimpl Default for ControllerNumber
impl Default for ControllerNumber
sourcefn default() -> ControllerNumber
fn default() -> ControllerNumber
Returns the “default value” for a type. Read more
sourceimpl Display for ControllerNumber
impl Display for ControllerNumber
sourceimpl From<ControllerNumber> for U7
impl From<ControllerNumber> for U7
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for u8
impl From<ControllerNumber> for u8
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for i128
impl From<ControllerNumber> for i128
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for usize
impl From<ControllerNumber> for usize
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for isize
impl From<ControllerNumber> for isize
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for i8
impl From<ControllerNumber> for i8
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for u16
impl From<ControllerNumber> for u16
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for i16
impl From<ControllerNumber> for i16
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for u32
impl From<ControllerNumber> for u32
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for i32
impl From<ControllerNumber> for i32
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for u64
impl From<ControllerNumber> for u64
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for i64
impl From<ControllerNumber> for i64
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<ControllerNumber> for u128
impl From<ControllerNumber> for u128
sourcefn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
sourceimpl From<U7> for ControllerNumber
impl From<U7> for ControllerNumber
sourceimpl FromStr for ControllerNumber
impl FromStr for ControllerNumber
sourceimpl Hash for ControllerNumber
impl Hash for ControllerNumber
sourceimpl Ord for ControllerNumber
impl Ord for ControllerNumber
sourceimpl PartialEq<ControllerNumber> for ControllerNumber
impl PartialEq<ControllerNumber> for ControllerNumber
sourcefn eq(&self, other: &ControllerNumber) -> bool
fn eq(&self, other: &ControllerNumber) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ControllerNumber) -> bool
fn ne(&self, other: &ControllerNumber) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ControllerNumber> for ControllerNumber
impl PartialOrd<ControllerNumber> for ControllerNumber
sourcefn partial_cmp(&self, other: &ControllerNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &ControllerNumber) -> 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
sourceimpl TryFrom<i128> for ControllerNumber
impl TryFrom<i128> for ControllerNumber
sourceimpl TryFrom<i16> for ControllerNumber
impl TryFrom<i16> for ControllerNumber
sourceimpl TryFrom<i32> for ControllerNumber
impl TryFrom<i32> for ControllerNumber
sourceimpl TryFrom<i64> for ControllerNumber
impl TryFrom<i64> for ControllerNumber
sourceimpl TryFrom<isize> for ControllerNumber
impl TryFrom<isize> for ControllerNumber
sourceimpl TryFrom<u128> for ControllerNumber
impl TryFrom<u128> for ControllerNumber
sourceimpl TryFrom<u16> for ControllerNumber
impl TryFrom<u16> for ControllerNumber
sourceimpl TryFrom<u32> for ControllerNumber
impl TryFrom<u32> for ControllerNumber
sourceimpl TryFrom<u64> for ControllerNumber
impl TryFrom<u64> for ControllerNumber
sourceimpl TryFrom<u8> for ControllerNumber
impl TryFrom<u8> for ControllerNumber
sourceimpl TryFrom<usize> for ControllerNumber
impl TryFrom<usize> for ControllerNumber
impl Copy for ControllerNumber
impl Eq for ControllerNumber
impl StructuralEq for ControllerNumber
impl StructuralPartialEq for ControllerNumber
Auto Trait Implementations
impl RefUnwindSafe for ControllerNumber
impl Send for ControllerNumber
impl Sync for ControllerNumber
impl Unpin for ControllerNumber
impl UnwindSafe for ControllerNumber
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