Struct U16
#[repr(transparent)]pub struct U16(pub [u8; 2]);
Tuple Fields§
§0: [u8; 2]
Implementations§
§impl U16
impl U16
pub const MAX: U16
pub const ZERO: U16
pub const fn new(val: u16) -> U16
pub const fn get(self) -> u16
pub fn set(&mut self, val: u16)
pub const fn incr(self) -> U16
pub const fn align(self) -> [u16; 1]
pub const fn to_bytes(self) -> [u8; 2]
pub const fn saturating_sub(self, rhs: U16) -> U16
pub const fn saturating_add(self, rhs: U16) -> U16
pub fn parse_byte_string(string: &[u8]) -> Result<U16, Error>
pub fn from_ref(b: &[u8; 2]) -> &U16
Trait Implementations§
§impl Ord for U16
impl Ord for U16
§impl PartialOrd for U16
impl PartialOrd for U16
impl Copy for U16
impl Eq for U16
impl StructuralPartialEq for U16
Auto Trait Implementations§
impl Freeze for U16
impl RefUnwindSafe for U16
impl Send for U16
impl Sync for U16
impl Unpin for U16
impl UnwindSafe for U16
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more