Struct U16Bytes
struct U16Bytes<E: Endian>(_, _)
An unaligned u16 value with an externally specified endianness of type E.
Implementations
impl<E: Endian> U16Bytes<E>
const fn from_bytes(n: [u8; 2]) -> SelfConstruct a new value given bytes that already have the required endianness.
fn new(e: E, n: u16) -> SelfConstruct a new value given a native endian value.
fn get(self: Self, e: E) -> u16Return the value as a native endian value.
fn set(self: &mut Self, e: E, n: u16)Set the value given a native endian value.
impl<E> Freeze for U16Bytes<E>
impl<E> RefUnwindSafe for U16Bytes<E>
impl<E> Send for U16Bytes<E>
impl<E> Sync for U16Bytes<E>
impl<E> Unpin for U16Bytes<E>
impl<E> UnwindSafe for U16Bytes<E>
impl<E: $crate::clone::Clone + Endian> Clone for U16Bytes<E>
fn clone(self: &Self) -> U16Bytes<E>
impl<E: $crate::cmp::Eq + Endian> Eq for U16Bytes<E>
impl<E: $crate::cmp::Ord + Endian> Ord for U16Bytes<E>
fn cmp(self: &Self, other: &U16Bytes<E>) -> $crate::cmp::Ordering
impl<E: $crate::cmp::PartialEq + Endian> PartialEq for U16Bytes<E>
fn eq(self: &Self, other: &U16Bytes<E>) -> bool
impl<E: $crate::cmp::PartialOrd + Endian> PartialOrd for U16Bytes<E>
fn partial_cmp(self: &Self, other: &U16Bytes<E>) -> $crate::option::Option<$crate::cmp::Ordering>
impl<E: $crate::default::Default + Endian> Default for U16Bytes<E>
fn default() -> U16Bytes<E>
impl<E: $crate::hash::Hash + Endian> Hash for U16Bytes<E>
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl<E: $crate::marker::Copy + Endian> Copy for U16Bytes<E>
impl<E: Endian> Debug for U16Bytes<E>
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl<E: Endian> Pod for U16Bytes<E>
impl<E: Endian> StructuralPartialEq for U16Bytes<E>
impl<T> Any for U16Bytes<E>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for U16Bytes<E>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for U16Bytes<E>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for U16Bytes<E>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for U16Bytes<E>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for U16Bytes<E>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for U16Bytes<E>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for U16Bytes<E>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for U16Bytes<E>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>