Struct snarkvm_utilities::biginteger::BigInteger256
source · Tuple Fields
0: [u64; 4]
Implementations
Trait Implementations
sourceimpl AsMut<[u64]> for BigInteger256
impl AsMut<[u64]> for BigInteger256
sourceimpl AsRef<[u64]> for BigInteger256
impl AsRef<[u64]> for BigInteger256
sourceimpl BigInteger for BigInteger256
impl BigInteger for BigInteger256
sourcefn add_nocarry(&mut self, other: &Self) -> bool
fn add_nocarry(&mut self, other: &Self) -> bool
Add another representation to this one, returning the carry bit.
sourcefn sub_noborrow(&mut self, other: &Self) -> bool
fn sub_noborrow(&mut self, other: &Self) -> bool
Subtract another representation from this one, returning the borrow bit.
sourcefn mul2(&mut self)
fn mul2(&mut self)
Performs a leftwise bitshift of this number, effectively multiplying
it by 2. Overflow is ignored. Read more
sourcefn div2(&mut self)
fn div2(&mut self)
Performs a rightwise bitshift of this number, effectively dividing
it by 2. Read more
sourcefn num_bits(&self) -> u32
fn num_bits(&self) -> u32
Compute the number of bits needed to encode this number. Always a
multiple of 64. Read more
sourcefn to_biguint(&self) -> BigUint
fn to_biguint(&self) -> BigUint
Returns the BigUint representation.
sourceimpl Clone for BigInteger256
impl Clone for BigInteger256
sourcefn clone(&self) -> BigInteger256
fn clone(&self) -> BigInteger256
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for BigInteger256
impl Debug for BigInteger256
sourceimpl Default for BigInteger256
impl Default for BigInteger256
sourcefn default() -> BigInteger256
fn default() -> BigInteger256
Returns the “default value” for a type. Read more
sourceimpl Display for BigInteger256
impl Display for BigInteger256
sourceimpl Distribution<BigInteger256> for Standard
impl Distribution<BigInteger256> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> BigInteger256
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> BigInteger256
Generate a random value of
T
, using rng
as the source of randomness.sourceimpl From<u64> for BigInteger256
impl From<u64> for BigInteger256
sourcefn from(val: u64) -> BigInteger256
fn from(val: u64) -> BigInteger256
Converts to this type from the input type.
sourceimpl FromBits for BigInteger256
impl FromBits for BigInteger256
sourcefn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Returns a BigInteger
by parsing a slice of bits in little-endian format
and transforms it into a slice of little-endian u64 elements.
sourcefn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Returns a BigInteger
by parsing a slice of bits in big-endian format
and transforms it into a slice of little-endian u64 elements.
sourceimpl FromBytes for BigInteger256
impl FromBytes for BigInteger256
sourceimpl Hash for BigInteger256
impl Hash for BigInteger256
sourceimpl Ord for BigInteger256
impl Ord for BigInteger256
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 PartialEq<BigInteger256> for BigInteger256
impl PartialEq<BigInteger256> for BigInteger256
sourcefn eq(&self, other: &BigInteger256) -> bool
fn eq(&self, other: &BigInteger256) -> bool
sourceimpl PartialOrd<BigInteger256> for BigInteger256
impl PartialOrd<BigInteger256> for BigInteger256
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> 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 moresourceimpl ToBits for BigInteger256
impl ToBits for BigInteger256
sourcefn to_bits_le(&self) -> Vec<bool> ⓘ
fn to_bits_le(&self) -> Vec<bool> ⓘ
Returns self
as a boolean array in little-endian order, with trailing zeros.
sourcefn to_bits_be(&self) -> Vec<bool> ⓘ
fn to_bits_be(&self) -> Vec<bool> ⓘ
Returns self
as a boolean array in big-endian order, with leading zeros.
sourceimpl ToBytes for BigInteger256
impl ToBytes for BigInteger256
impl Copy for BigInteger256
impl Eq for BigInteger256
impl StructuralEq for BigInteger256
impl StructuralPartialEq for BigInteger256
Auto Trait Implementations
impl RefUnwindSafe for BigInteger256
impl Send for BigInteger256
impl Sync for BigInteger256
impl Unpin for BigInteger256
impl UnwindSafe for BigInteger256
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