Struct extended_primitives::uint256::Uint256
source · [−]Tuple Fields
0: [u64; 4]
Implementations
sourceimpl Uint256
impl Uint256
sourcepub fn as_mut_ptr(&mut self) -> *mut u64
pub fn as_mut_ptr(&mut self) -> *mut u64
Converts the object to a mutable raw pointer
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether the object, as an array, is empty. Always false.
pub fn to_le_bytes(&self) -> [u8; 32]
sourcepub fn into_bytes(self) -> [u64; 4]
pub fn into_bytes(self) -> [u64; 4]
Returns the underlying bytes.
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_big_endian(slice: &[u8]) -> Self
pub fn from_big_endian(slice: &[u8]) -> Self
Converts from big endian representation bytes in memory.
pub fn from_bytes(slice: &[u8]) -> Self
pub fn increment(&mut self)
Trait Implementations
sourceimpl BitArray for Uint256
impl BitArray for Uint256
Little-endian large integer type
sourceimpl Ord for Uint256
impl Ord for Uint256
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 Uint256
impl Eq 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 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