pub struct Uint128(pub [u64; 2]);
Expand description
Little-endian large integer type
Tuple Fields§
§0: [u64; 2]
Implementations§
source§impl Uint128
impl Uint128
source§impl 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§
source§impl BitArray for Uint128
impl BitArray for Uint128
source§impl<'de> Deserialize<'de> for Uint128
impl<'de> Deserialize<'de> for Uint128
source§fn 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
source§impl Ord for Uint128
impl Ord for Uint128
source§impl PartialEq<Uint128> for Uint128
impl PartialEq<Uint128> for Uint128
source§impl PartialOrd<Uint128> for Uint128
impl PartialOrd<Uint128> for Uint128
1.0.0 · source§fn 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§
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