Struct object::endian::U16Bytes[][src]

#[repr(transparent)]pub struct U16Bytes<E: Endian>(_, _);

An unaligned u16 value with an externally specified endianness of type E.

Implementations

impl<E: Endian> U16Bytes<E>[src]

pub fn new(e: E, n: u16) -> Self[src]

Construct a new value given a native endian value.

pub fn get(self, e: E) -> u16[src]

Return the value as a native endian value.

pub fn set(&mut self, e: E, n: u16)[src]

Set the value given a native endian value.

Trait Implementations

impl<E: Clone + Endian> Clone for U16Bytes<E>[src]

impl<E: Copy + Endian> Copy for U16Bytes<E>[src]

impl<E: Endian> Debug for U16Bytes<E>[src]

impl<E: Default + Endian> Default for U16Bytes<E>[src]

impl<E: Eq + Endian> Eq for U16Bytes<E>[src]

impl<E: Hash + Endian> Hash for U16Bytes<E>[src]

impl<E: Ord + Endian> Ord for U16Bytes<E>[src]

impl<E: PartialEq + Endian> PartialEq<U16Bytes<E>> for U16Bytes<E>[src]

impl<E: PartialOrd + Endian> PartialOrd<U16Bytes<E>> for U16Bytes<E>[src]

impl<E: Endian> Pod for U16Bytes<E>[src]

impl<E: Endian> StructuralEq for U16Bytes<E>[src]

impl<E: Endian> StructuralPartialEq for U16Bytes<E>[src]

Auto Trait Implementations

impl<E> Send for U16Bytes<E> where
    E: Send

impl<E> Sync for U16Bytes<E> where
    E: Sync

impl<E> Unpin for U16Bytes<E> where
    E: Unpin

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, 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.