Struct U32
#[repr(transparent)]pub struct U32(pub [u8; 4]);
Tuple Fields§
§0: [u8; 4]
Implementations§
§impl U32
impl U32
pub const MAX: U32
pub const ZERO: U32
pub const fn new(val: u32) -> U32
pub const fn get(self) -> u32
pub fn set(&mut self, val: u32)
pub const fn incr(self) -> U32
pub const fn align(self) -> [u32; 1]
pub const fn to_bytes(self) -> [u8; 4]
pub const fn saturating_sub(self, rhs: U32) -> U32
pub const fn saturating_add(self, rhs: U32) -> U32
pub fn parse_byte_string(string: &[u8]) -> Result<U32, Error>
pub fn from_ref(b: &[u8; 4]) -> &U32
Trait Implementations§
§impl Ord for U32
impl Ord for U32
§impl PartialOrd for U32
impl PartialOrd for U32
impl Copy for U32
impl Eq for U32
impl StructuralPartialEq for U32
Auto Trait Implementations§
impl Freeze for U32
impl RefUnwindSafe for U32
impl Send for U32
impl Sync for U32
impl Unpin for U32
impl UnwindSafe for U32
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