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