pub struct Be16(_);
Expand description
An unsigned integer type of with an explicit endianness.
See module level documentation for examples.
Implementations
Trait Implementations
sourceimpl ByteValued for Be16
impl ByteValued for Be16
sourcefn from_slice(data: &[u8]) -> Option<&Self>
fn from_slice(data: &[u8]) -> Option<&Self>
Converts a slice of raw data into a reference of Self
. Read more
sourcefn from_mut_slice(data: &mut [u8]) -> Option<&mut Self>
fn from_mut_slice(data: &mut [u8]) -> Option<&mut Self>
Converts a mutable slice of raw data into a mutable reference of Self
. Read more
sourcefn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Converts a reference to self
into a slice of bytes. Read more
sourcefn as_mut_slice(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn as_mut_slice(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Converts a mutable reference to self
into a mutable slice of bytes. Read more
sourcefn as_bytes(&mut self) -> VolatileSlice<'_>
fn as_bytes(&mut self) -> VolatileSlice<'_>
Converts a mutable reference to self
into a VolatileSlice
. This is
useful because VolatileSlice
provides a Bytes<usize>
implementation. Read more
impl Copy for Be16
impl Eq for Be16
impl StructuralEq for Be16
impl StructuralPartialEq for Be16
Auto Trait Implementations
impl RefUnwindSafe for Be16
impl Send for Be16
impl Sync for Be16
impl Unpin for Be16
impl UnwindSafe for Be16
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more