[][src]Struct helgoboss_midi::ControllerNumber

pub struct ControllerNumber(_);

A controller number (0 - 127) of a MIDI Control Change message.

Methods

impl ControllerNumber[src]

pub const MIN: ControllerNumber[src]

The smallest value that can be represented by this type.

pub const MAX: ControllerNumber[src]

The largest value that can be represented by this type.

pub fn new(value: u8) -> ControllerNumber[src]

Creates a ControllerNumber.

Panics

This function panics if value is greater than 127.

pub const unsafe fn new_unchecked(value: u8) -> ControllerNumber[src]

Creates a ControllerNumber without checking value.

Safety

value must not be greater than 127.

pub const fn get(self) -> u8[src]

Returns the value as a primitive type.

impl ControllerNumber[src]

pub fn can_be_part_of_14_bit_control_change_message(&self) -> bool[src]

Returns whether this controller number can be used to make up a 14-bit Control Change message.

pub fn corresponding_14_bit_lsb_controller_number(
    &self
) -> Option<ControllerNumber>
[src]

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.

pub fn is_parameter_number_message_controller_number(&self) -> bool[src]

Returns whether this controller number is intended to be used to send part of a (N)RPN message.

pub fn is_channel_mode_message_controller_number(&self) -> bool[src]

Returns whether this controller number is intended to be used to send Channel Mode messages.

Trait Implementations

impl Clone for ControllerNumber[src]

impl Copy for ControllerNumber[src]

impl Debug for ControllerNumber[src]

impl Default for ControllerNumber[src]

impl Display for ControllerNumber[src]

impl Eq for ControllerNumber[src]

impl From<ControllerNumber> for U7[src]

impl From<ControllerNumber> for u8[src]

impl From<ControllerNumber> for i128[src]

impl From<ControllerNumber> for usize[src]

impl From<ControllerNumber> for isize[src]

impl From<ControllerNumber> for i8[src]

impl From<ControllerNumber> for u16[src]

impl From<ControllerNumber> for i16[src]

impl From<ControllerNumber> for u32[src]

impl From<ControllerNumber> for i32[src]

impl From<ControllerNumber> for u64[src]

impl From<ControllerNumber> for i64[src]

impl From<ControllerNumber> for u128[src]

impl From<U7> for ControllerNumber[src]

impl Hash for ControllerNumber[src]

impl Ord for ControllerNumber[src]

impl PartialEq<ControllerNumber> for ControllerNumber[src]

impl PartialOrd<ControllerNumber> for ControllerNumber[src]

impl StructuralEq for ControllerNumber[src]

impl StructuralPartialEq for ControllerNumber[src]

impl TryFrom<i128> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<i16> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<i32> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<i64> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<isize> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u128> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u16> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u32> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u64> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u8> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<usize> for ControllerNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.