Expand description
Little-endian large integer type
Tuple Fields
0: [u64; 2]
Implementations
sourceimpl Uint128
impl Uint128
sourceimpl Uint128
impl Uint128
sourcepub fn from_u64(init: u64) -> Option<Uint128>
pub fn from_u64(init: u64) -> Option<Uint128>
Create an object from a given unsigned 64-bit integer
sourcepub fn from_i64(init: i64) -> Option<Uint128>
pub fn from_i64(init: i64) -> Option<Uint128>
Create an object from a given signed 64-bit integer
sourcepub fn from_be_bytes(bytes: [u8; 16]) -> Uint128
pub fn from_be_bytes(bytes: [u8; 16]) -> Uint128
Creates big integer value from a byte array using big-endian encoding
sourcepub fn from_be_slice(bytes: &[u8]) -> Result<Uint128, ParseLengthError>
pub fn from_be_slice(bytes: &[u8]) -> Result<Uint128, ParseLengthError>
Creates big integer value from a byte slice using big-endian encoding
sourcepub fn to_be_bytes(&self) -> [u8; 16]
pub fn to_be_bytes(&self) -> [u8; 16]
Convert a big integer into a byte array using big-endian encoding
Trait Implementations
sourceimpl BitArray for Uint128
impl BitArray for Uint128
sourceimpl<'de> Deserialize<'de> for Uint128
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Uint128
Available on crate feature
serde
only.sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for Uint128
impl Ord for Uint128
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Uint128> for Uint128
impl PartialOrd<Uint128> for Uint128
sourcefn partial_cmp(&self, other: &Uint128) -> Option<Ordering>
fn partial_cmp(&self, other: &Uint128) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Uint128
impl Eq for Uint128
impl StructuralEq for Uint128
impl StructuralPartialEq for Uint128
Auto Trait Implementations
impl RefUnwindSafe for Uint128
impl Send for Uint128
impl Sync for Uint128
impl Unpin for Uint128
impl UnwindSafe for Uint128
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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