Struct wmidi::U14 [−][src]
pub struct U14(_);
A combination of 2 data bytes that holds 14 bits of information.
Implementations
impl U14
[src]
impl U14
[src]pub const MIN: U14
[src]
The minimum value for a u14 data byte.
pub const MAX: U14
[src]
The maximum value for a u7 data byte.
pub unsafe fn from_unchecked(data: u16) -> U14
[src]
pub fn try_from_slice(slice: &[u16]) -> Result<&[U14], Error>
[src]
Convert a slice of u16
into a slice of U14
. If any of the data is out of range, then an
error is returned.
pub fn data_to_slice(data: &[U14]) -> &[u16]
[src]
Convert a slice of U14
into a slice u16
. Since U14
is a subset of u16
, this is a
simple cast.
pub unsafe fn from_slice_unchecked(slice: &[u16]) -> &[U14]
[src]
Convert a slice of u16
to a slice of U14
without bounds checking.
Safety
Behavior is undefined if any byte is > 16383.
Trait Implementations
impl PartialOrd<U14> for U14
[src]
impl PartialOrd<U14> for U14
[src]impl StructuralEq for U14
[src]
impl StructuralEq for U14
[src]impl StructuralPartialEq for U14
[src]
impl StructuralPartialEq for U14
[src]Auto Trait Implementations
impl RefUnwindSafe for U14
impl RefUnwindSafe for U14
impl UnwindSafe for U14
impl UnwindSafe for U14