pub struct Uint256(pub [u64; 4]);Expand description
Little-endian large integer type
Tuple Fields§
§0: [u64; 4]Implementations§
source§impl Uint256
impl Uint256
source§impl 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§
source§impl BitArray for Uint256
impl BitArray for Uint256
source§impl Decodable for Uint256
impl Decodable for Uint256
source§impl Ord for Uint256
impl Ord for Uint256
source§impl PartialEq<Uint256> for Uint256
impl PartialEq<Uint256> for Uint256
source§impl PartialOrd<Uint256> for Uint256
impl PartialOrd<Uint256> for Uint256
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 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§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.