Struct snarkvm_utilities::biginteger::biginteger::BigInteger128
source · [−]Tuple Fields
0: [u64; 2]
Implementations
Trait Implementations
sourceimpl BigInteger for BigInteger128
impl BigInteger for BigInteger128
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 BigInteger128
impl Clone for BigInteger128
sourcefn clone(&self) -> BigInteger128
fn clone(&self) -> BigInteger128
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 more
sourceimpl Debug for BigInteger128
impl Debug for BigInteger128
sourceimpl Default for BigInteger128
impl Default for BigInteger128
sourcefn default() -> BigInteger128
fn default() -> BigInteger128
Returns the “default value” for a type. Read more
sourceimpl Display for BigInteger128
impl Display for BigInteger128
sourceimpl Distribution<BigInteger128> for Standard
impl Distribution<BigInteger128> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> BigInteger128
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> BigInteger128
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl From<u64> for BigInteger128
impl From<u64> for BigInteger128
sourcefn from(val: u64) -> BigInteger128
fn from(val: u64) -> BigInteger128
Performs the conversion.
sourceimpl FromBits for BigInteger128
impl FromBits for BigInteger128
sourcefn from_bits_le(bits: &[bool]) -> Self
fn from_bits_le(bits: &[bool]) -> 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]) -> Self
fn from_bits_be(bits: &[bool]) -> 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 BigInteger128
impl FromBytes for BigInteger128
sourceimpl Hash for BigInteger128
impl Hash for BigInteger128
sourceimpl Ord for BigInteger128
impl Ord for BigInteger128
sourceimpl PartialEq<BigInteger128> for BigInteger128
impl PartialEq<BigInteger128> for BigInteger128
sourcefn eq(&self, other: &BigInteger128) -> bool
fn eq(&self, other: &BigInteger128) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BigInteger128) -> bool
fn ne(&self, other: &BigInteger128) -> bool
This method tests for !=
.
sourceimpl PartialOrd<BigInteger128> for BigInteger128
impl PartialOrd<BigInteger128> for BigInteger128
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> 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
sourceimpl ToBits for BigInteger128
impl ToBits for BigInteger128
sourceimpl ToBytes for BigInteger128
impl ToBytes for BigInteger128
impl Copy for BigInteger128
impl Eq for BigInteger128
impl StructuralEq for BigInteger128
impl StructuralPartialEq for BigInteger128
Auto Trait Implementations
impl RefUnwindSafe for BigInteger128
impl Send for BigInteger128
impl Sync for BigInteger128
impl Unpin for BigInteger128
impl UnwindSafe for BigInteger128
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more