Struct wmidi::U7 [−][src]
pub struct U7(_);
Expand description
A data byte that holds 7 bits of information.
Implementations
impl U7
[src]
impl U7
[src]pub unsafe fn from_unchecked(data: u8) -> U7
[src]
pub unsafe fn from_unchecked(data: u8) -> U7
[src]pub const fn from_u8_lossy(data: u8) -> U7
[src]
pub const fn from_u8_lossy(data: u8) -> U7
[src]Create a U7
from a u8
. Only the 7 least significant bits of note
are kept.
pub fn try_from_bytes(bytes: &[u8]) -> Result<&[U7], Error>
[src]
pub fn try_from_bytes(bytes: &[u8]) -> Result<&[U7], Error>
[src]Convert a slice of u8
into a slice of U7
. If any of the data is out of range, then an
error is returned.
Trait Implementations
impl From<ControlFunction> for U7
[src]
impl From<ControlFunction> for U7
[src]fn from(control_function: ControlFunction) -> U7
[src]
fn from(control_function: ControlFunction) -> U7
[src]Performs the conversion.
impl From<U7> for ControlFunction
[src]
impl From<U7> for ControlFunction
[src]fn from(data: U7) -> ControlFunction
[src]
fn from(data: U7) -> ControlFunction
[src]Performs the conversion.
impl Ord for U7
[src]
impl Ord for U7
[src]impl PartialOrd<U7> for U7
[src]
impl PartialOrd<U7> for U7
[src]fn partial_cmp(&self, other: &U7) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &U7) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for U7
[src]
impl Eq for U7
[src]
impl StructuralEq for U7
[src]
impl StructuralPartialEq for U7
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more