pub struct BigInteger256(pub [u64; 4]);
Tuple Fields§
§0: [u64; 4]
Implementations§
Trait Implementations§
Source§impl AsMut<[u64]> for BigInteger256
impl AsMut<[u64]> for BigInteger256
Source§impl AsRef<[u64]> for BigInteger256
impl AsRef<[u64]> for BigInteger256
Source§impl BigInteger for BigInteger256
impl BigInteger for BigInteger256
Source§fn 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.
Source§fn 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.
Source§fn mul2(&mut self)
fn mul2(&mut self)
Performs a leftwise bitshift of this number, effectively multiplying
it by 2. Overflow is ignored.
Source§fn div2(&mut self)
fn div2(&mut self)
Performs a rightwise bitshift of this number, effectively dividing
it by 2.
Source§fn num_bits(&self) -> u32
fn num_bits(&self) -> u32
Compute the number of bits needed to encode this number. Always a
multiple of 64.
Source§fn to_biguint(&self) -> BigUint
fn to_biguint(&self) -> BigUint
Returns the BigUint representation.
Source§impl Clone for BigInteger256
impl Clone for BigInteger256
Source§fn clone(&self) -> BigInteger256
fn clone(&self) -> BigInteger256
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BigInteger256
impl Debug for BigInteger256
Source§impl Default for BigInteger256
impl Default for BigInteger256
Source§fn default() -> BigInteger256
fn default() -> BigInteger256
Returns the “default value” for a type. Read more
Source§impl Display for BigInteger256
impl Display for BigInteger256
Source§impl Distribution<BigInteger256> for Standard
impl Distribution<BigInteger256> for Standard
Source§fn 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.Source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
Create an iterator that generates random values of
T
, using rng
as
the source of randomness. Read moreSource§impl From<u64> for BigInteger256
impl From<u64> for BigInteger256
Source§fn from(val: u64) -> BigInteger256
fn from(val: u64) -> BigInteger256
Converts to this type from the input type.
Source§impl FromBits for BigInteger256
impl FromBits for BigInteger256
Source§fn 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.
Source§fn 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.
Source§impl FromBytes for BigInteger256
impl FromBytes for BigInteger256
Source§impl Hash for BigInteger256
impl Hash for BigInteger256
Source§impl Ord for BigInteger256
impl Ord for BigInteger256
Source§impl PartialEq for BigInteger256
impl PartialEq for BigInteger256
Source§impl PartialOrd for BigInteger256
impl PartialOrd for BigInteger256
Source§impl ToBits for BigInteger256
impl ToBits for BigInteger256
Source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Returns self
as a boolean array in little-endian order, with trailing zeros.
Source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Returns self
as a boolean array in big-endian order, with leading zeros.
Source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns
self
as a boolean array in little-endian order.Source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns
self
as a boolean array in big-endian order.Source§impl ToBytes for BigInteger256
impl ToBytes for BigInteger256
Source§impl Zeroize for BigInteger256
impl Zeroize for BigInteger256
impl Copy for BigInteger256
impl Eq for BigInteger256
impl StructuralPartialEq for BigInteger256
Auto Trait Implementations§
impl Freeze for BigInteger256
impl RefUnwindSafe for BigInteger256
impl Send for BigInteger256
impl Sync for BigInteger256
impl Unpin for BigInteger256
impl UnwindSafe for BigInteger256
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more