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