[][src]Struct helgoboss_midi::KeyNumber

pub struct KeyNumber(_);

A key number (0 - 127), e.g. of a MIDI Note On message.

Methods

impl KeyNumber[src]

pub const MIN: KeyNumber[src]

The smallest value that can be represented by this type.

pub const MAX: KeyNumber[src]

The largest value that can be represented by this type.

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

Creates a KeyNumber.

Panics

This function panics if value is greater than 127.

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

Creates a KeyNumber 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.

Trait Implementations

impl Clone for KeyNumber[src]

impl Copy for KeyNumber[src]

impl Debug for KeyNumber[src]

impl Default for KeyNumber[src]

impl Display for KeyNumber[src]

impl Eq for KeyNumber[src]

impl From<KeyNumber> for U7[src]

impl From<KeyNumber> for u8[src]

impl From<KeyNumber> for i128[src]

impl From<KeyNumber> for usize[src]

impl From<KeyNumber> for isize[src]

impl From<KeyNumber> for i8[src]

impl From<KeyNumber> for u16[src]

impl From<KeyNumber> for i16[src]

impl From<KeyNumber> for u32[src]

impl From<KeyNumber> for i32[src]

impl From<KeyNumber> for u64[src]

impl From<KeyNumber> for i64[src]

impl From<KeyNumber> for u128[src]

impl From<U7> for KeyNumber[src]

impl Hash for KeyNumber[src]

impl Ord for KeyNumber[src]

impl PartialEq<KeyNumber> for KeyNumber[src]

impl PartialOrd<KeyNumber> for KeyNumber[src]

impl StructuralEq for KeyNumber[src]

impl StructuralPartialEq for KeyNumber[src]

impl TryFrom<i128> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<i16> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<i32> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<i64> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<isize> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u128> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u16> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u32> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u64> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<u8> for KeyNumber[src]

type Error = TryFromGreaterError

The type returned in the event of a conversion error.

impl TryFrom<usize> for KeyNumber[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.