pub struct ControllerNumber(/* private fields */);
Expand description
A controller number (0 - 127) of a MIDI Control Change message.
Implementations§
Source§impl ControllerNumber
impl ControllerNumber
Sourcepub const MIN: ControllerNumber
pub const MIN: ControllerNumber
The smallest value that can be represented by this type.
Sourcepub const MAX: ControllerNumber
pub const MAX: ControllerNumber
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
Source§impl 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§
Source§impl Clone for ControllerNumber
impl Clone for ControllerNumber
Source§fn clone(&self) -> ControllerNumber
fn clone(&self) -> ControllerNumber
Returns a duplicate 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 ControllerNumber
impl Debug for ControllerNumber
Source§impl Default for ControllerNumber
impl Default for ControllerNumber
Source§fn default() -> ControllerNumber
fn default() -> ControllerNumber
Returns the “default value” for a type. Read more
Source§impl Display for ControllerNumber
impl Display for ControllerNumber
Source§impl From<ControllerNumber> for U7
impl From<ControllerNumber> for U7
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for i128
impl From<ControllerNumber> for i128
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for i16
impl From<ControllerNumber> for i16
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for i32
impl From<ControllerNumber> for i32
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for i64
impl From<ControllerNumber> for i64
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for i8
impl From<ControllerNumber> for i8
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for isize
impl From<ControllerNumber> for isize
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for u128
impl From<ControllerNumber> for u128
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for u16
impl From<ControllerNumber> for u16
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for u32
impl From<ControllerNumber> for u32
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for u64
impl From<ControllerNumber> for u64
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for u8
impl From<ControllerNumber> for u8
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<ControllerNumber> for usize
impl From<ControllerNumber> for usize
Source§fn from(value: ControllerNumber) -> Self
fn from(value: ControllerNumber) -> Self
Converts to this type from the input type.
Source§impl From<U7> for ControllerNumber
impl From<U7> for ControllerNumber
Source§impl FromStr for ControllerNumber
impl FromStr for ControllerNumber
Source§impl Hash for ControllerNumber
impl Hash for ControllerNumber
Source§impl Ord for ControllerNumber
impl Ord for ControllerNumber
Source§fn cmp(&self, other: &ControllerNumber) -> Ordering
fn cmp(&self, other: &ControllerNumber) -> 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 ControllerNumber
impl PartialEq for ControllerNumber
Source§impl PartialOrd for ControllerNumber
impl PartialOrd for ControllerNumber
Source§impl TryFrom<i128> for ControllerNumber
impl TryFrom<i128> for ControllerNumber
Source§impl TryFrom<i16> for ControllerNumber
impl TryFrom<i16> for ControllerNumber
Source§impl TryFrom<i32> for ControllerNumber
impl TryFrom<i32> for ControllerNumber
Source§impl TryFrom<i64> for ControllerNumber
impl TryFrom<i64> for ControllerNumber
Source§impl TryFrom<isize> for ControllerNumber
impl TryFrom<isize> for ControllerNumber
Source§impl TryFrom<u128> for ControllerNumber
impl TryFrom<u128> for ControllerNumber
Source§impl TryFrom<u16> for ControllerNumber
impl TryFrom<u16> for ControllerNumber
Source§impl TryFrom<u32> for ControllerNumber
impl TryFrom<u32> for ControllerNumber
Source§impl TryFrom<u64> for ControllerNumber
impl TryFrom<u64> for ControllerNumber
Source§impl TryFrom<u8> for ControllerNumber
impl TryFrom<u8> for ControllerNumber
Source§impl TryFrom<usize> for ControllerNumber
impl TryFrom<usize> for ControllerNumber
impl Copy for ControllerNumber
impl Eq for ControllerNumber
impl StructuralPartialEq for ControllerNumber
Auto Trait Implementations§
impl Freeze for ControllerNumber
impl RefUnwindSafe for ControllerNumber
impl Send for ControllerNumber
impl Sync for ControllerNumber
impl Unpin for ControllerNumber
impl UnwindSafe for ControllerNumber
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