BigInt

Struct BigInt 

Source
pub struct BigInt { /* private fields */ }
Expand description

Big integer

Wraps underlying BigInt implementation (either GMP bindings or num-bigint), exposes only very limited API that allows easily switching between implementations.

Set of traits implemented on BigInt remains the same regardless of underlying implementation.

Trait Implementations§

Source§

impl Add<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &BigInt) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&BigInt> for u64

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &BigInt) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: BigInt) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<BigInt> for u64

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: BigInt) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u64> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u64> for BigInt

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for &BigInt

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for BigInt

Source§

type Output = BigInt

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<&BigInt> for BigInt

Source§

fn add_assign(&mut self, rhs: &BigInt)

Performs the += operation. Read more
Source§

impl AddAssign<u64> for BigInt

Source§

fn add_assign(&mut self, rhs: u64)

Performs the += operation. Read more
Source§

impl AddAssign for BigInt

Source§

fn add_assign(&mut self, rhs: BigInt)

Performs the += operation. Read more
Source§

impl BasicOps for BigInt

Source§

fn pow(&self, exponent: u32) -> Self

Source§

fn mul(&self, other: &Self) -> Self

Source§

fn sub(&self, other: &Self) -> Self

Source§

fn add(&self, other: &Self) -> Self

Source§

fn abs(&self) -> Self

Source§

impl BitAnd<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &BigInt) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: BigInt) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for &BigInt

Source§

type Output = BigInt

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for BigInt

Source§

type Output = BigInt

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign<&BigInt> for BigInt

Source§

fn bitand_assign(&mut self, rhs: &BigInt)

Performs the &= operation. Read more
Source§

impl BitAndAssign for BigInt

Source§

fn bitand_assign(&mut self, rhs: BigInt)

Performs the &= operation. Read more
Source§

impl BitManipulation for BigInt

Source§

fn set_bit(&mut self, bit: usize, bit_val: bool)

Sets/unsets bit in the number Read more
Source§

fn test_bit(&self, bit: usize) -> bool

Tests if bit is set Read more
Source§

fn bit_length(&self) -> usize

Length of the number in bits Read more
Source§

impl BitOrAssign<&BigInt> for BigInt

Source§

fn bitor_assign(&mut self, rhs: &BigInt)

Performs the |= operation. Read more
Source§

impl BitOrAssign for BigInt

Source§

fn bitor_assign(&mut self, rhs: BigInt)

Performs the |= operation. Read more
Source§

impl BitXor<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &BigInt) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: BigInt) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor for &BigInt

Source§

type Output = BigInt

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor for BigInt

Source§

type Output = BigInt

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign<&BigInt> for BigInt

Source§

fn bitxor_assign(&mut self, rhs: &BigInt)

Performs the ^= operation. Read more
Source§

impl BitXorAssign for BigInt

Source§

fn bitxor_assign(&mut self, rhs: BigInt)

Performs the ^= operation. Read more
Source§

impl Clone for BigInt

Source§

fn clone(&self) -> BigInt

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<H: Digest + Clone> Commitment<BigInt> for HashCommitment<H>

Source§

impl ConvertFrom<BigInt> for u64

Source§

fn _from(x: &BigInt) -> u64

👎Deprecated since 0.6.0: Use corresponding From<T> and TryFrom<T> traits implemented on BigInt
Source§

impl Converter for BigInt

Source§

fn to_bytes(&self) -> Vec<u8>

Returns bytes representation of the number. Read more
Source§

fn from_bytes(bytes: &[u8]) -> Self

Constructs BigInt from its byte representation Read more
Source§

fn to_hex(&self) -> String

Converts BigInt to hex representation. Read more
Source§

fn from_hex(n: &str) -> Result<Self, ParseBigIntError>

Parses given hex string. Read more
Source§

fn to_str_radix(&self, radix: u8) -> String

Converts BigInt to radix representation. Read more
Source§

fn from_str_radix(str: &str, radix: u8) -> Result<Self, ParseBigIntError>

Parses given radix string. Read more
Source§

fn to_bytes_array<const N: usize>(&self) -> Option<[u8; N]>

Returns bytes representation of the number in an array with length chosen by the user if the array is larger than the bytes it pads it with zeros in the most significant bytes If the array is too small for the integer it returns None. Read more
Source§

impl Debug for BigInt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BigInt

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for BigInt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &BigInt) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: BigInt) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<u64> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u64) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<u64> for BigInt

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u64) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for &BigInt

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for BigInt

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<&BigInt> for BigInt

Source§

fn div_assign(&mut self, rhs: &BigInt)

Performs the /= operation. Read more
Source§

impl DivAssign<u64> for BigInt

Source§

fn div_assign(&mut self, rhs: u64)

Performs the /= operation. Read more
Source§

impl DivAssign for BigInt

Source§

fn div_assign(&mut self, rhs: BigInt)

Performs the /= operation. Read more
Source§

impl EGCD for BigInt

Source§

fn egcd(a: &Self, b: &Self) -> (Self, Self, Self)

For given a, b calculates gcd(a,b), p, q such as gcd(a,b) = a*p + b*q Read more
Source§

impl<E: Curve> From<&BigInt> for Scalar<E>

Source§

fn from(n: &BigInt) -> Self

Converts to this type from the input type.
Source§

impl<E: Curve> From<BigInt> for Scalar<E>

Source§

fn from(n: BigInt) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for BigInt

Source§

fn from(x: i32) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for BigInt

Source§

fn from(n: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for BigInt

Source§

fn from(x: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for BigInt

Source§

fn from(x: u64) -> Self

Converts to this type from the input type.
Source§

impl Integer for BigInt

Source§

fn div_floor(&self, other: &Self) -> Self

Floored integer division. Read more
Source§

fn mod_floor(&self, other: &Self) -> Self

Floored integer modulo, satisfying: Read more
Source§

fn div_ceil(&self, other: &Self) -> Self

Ceiled integer division. Read more
Source§

fn gcd(&self, other: &Self) -> Self

Greatest Common Divisor (GCD). Read more
Source§

fn lcm(&self, other: &Self) -> Self

Lowest Common Multiple (LCM). Read more
Source§

fn gcd_lcm(&self, other: &Self) -> (Self, Self)

Greatest Common Divisor (GCD) and Lowest Common Multiple (LCM) together. Read more
Source§

fn divides(&self, other: &Self) -> bool

👎Deprecated: Please use is_multiple_of instead
Deprecated, use is_multiple_of instead.
Source§

fn is_multiple_of(&self, other: &Self) -> bool

Returns true if self is a multiple of other. Read more
Source§

fn is_even(&self) -> bool

Returns true if the number is even. Read more
Source§

fn is_odd(&self) -> bool

Returns true if the number is odd. Read more
Source§

fn div_rem(&self, other: &Self) -> (Self, Self)

Simultaneous truncated integer division and modulus. Returns (quotient, remainder). Read more
Source§

fn div_mod_floor(&self, other: &Self) -> (Self, Self)

Simultaneous floored integer division and modulus. Returns (quotient, remainder). Read more
Source§

fn next_multiple_of(&self, other: &Self) -> Self
where Self: Clone,

Rounds up to nearest multiple of argument. Read more
Source§

fn prev_multiple_of(&self, other: &Self) -> Self
where Self: Clone,

Rounds down to nearest multiple of argument. Read more
Source§

fn extended_gcd(&self, other: &Self) -> ExtendedGcd<Self>
where Self: Clone,

Greatest common divisor and Bézout coefficients. Read more
Source§

fn dec(&mut self)
where Self: Clone,

Decrements self by one. Read more
Source§

fn inc(&mut self)
where Self: Clone,

Increments self by one. Read more
Source§

impl Modulo for BigInt

Source§

fn mod_pow(base: &Self, exponent: &Self, modulus: &Self) -> Self

Calculates base^(exponent) (mod m) Read more
Source§

fn mod_mul(a: &Self, b: &Self, modulus: &Self) -> Self

Calculates a * b (mod m)
Source§

fn mod_sub(a: &Self, b: &Self, modulus: &Self) -> Self

Calculates a - b (mod m)
Source§

fn mod_add(a: &Self, b: &Self, modulus: &Self) -> Self

Calculates a + b (mod m)
Source§

fn mod_inv(a: &Self, modulus: &Self) -> Option<Self>

Calculates a^-1 (mod m). Returns None if a and m are not coprimes.
Source§

fn modulus(&self, modulus: &Self) -> Self

Calculates a mod m
Source§

impl Mul<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigInt) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&BigInt> for u64

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigInt) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigInt) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<BigInt> for u64

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigInt) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<u64> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<u64> for BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for &BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for BigInt

Source§

type Output = BigInt

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<&BigInt> for BigInt

Source§

fn mul_assign(&mut self, rhs: &BigInt)

Performs the *= operation. Read more
Source§

impl MulAssign<u64> for BigInt

Source§

fn mul_assign(&mut self, rhs: u64)

Performs the *= operation. Read more
Source§

impl MulAssign for BigInt

Source§

fn mul_assign(&mut self, rhs: BigInt)

Performs the *= operation. Read more
Source§

impl Neg for &BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Num for BigInt

Source§

type FromStrRadixErr = ParseBigIntError

Source§

fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>

Convert from a string and radix (typically 2..=36). Read more
Source§

impl NumberTests for BigInt

Source§

fn is_zero(n: &Self) -> bool

Returns true if n is zero Read more
Source§

fn is_negative(n: &Self) -> bool

Returns true if n is negative Read more
Source§

impl One for BigInt

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl Ord for BigInt

Source§

fn cmp(&self, other: &BigInt) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for BigInt

Source§

fn eq(&self, other: &BigInt) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for BigInt

Source§

fn partial_cmp(&self, other: &BigInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Primes for BigInt

Source§

fn next_prime(&self) -> BigInt

Finds next prime number using probabilistic algorithms
Source§

fn is_probable_prime(&self, n: u32) -> bool

Probabilistically determine whether number is prime Read more
Source§

impl Rem<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &BigInt) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: BigInt) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<u64> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: u64) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<u64> for BigInt

Source§

type Output = BigInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: u64) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for &BigInt

Source§

type Output = BigInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for BigInt

Source§

type Output = BigInt

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign<&BigInt> for BigInt

Source§

fn rem_assign(&mut self, rhs: &BigInt)

Performs the %= operation. Read more
Source§

impl RemAssign<u64> for BigInt

Source§

fn rem_assign(&mut self, rhs: u64)

Performs the %= operation. Read more
Source§

impl RemAssign for BigInt

Source§

fn rem_assign(&mut self, rhs: BigInt)

Performs the %= operation. Read more
Source§

impl Roots for BigInt

Source§

fn nth_root(&self, n: u32) -> Self

Returns the truncated principal nth root of an integer – if x >= 0 { ⌊ⁿ√x⌋ } else { ⌈ⁿ√x⌉ } Read more
Source§

fn sqrt(&self) -> Self

Returns the truncated principal square root of an integer – ⌊√x⌋ Read more
Source§

fn cbrt(&self) -> Self

Returns the truncated principal cube root of an integer – if x >= 0 { ⌊∛x⌋ } else { ⌈∛x⌉ } Read more
Source§

impl Samplable for BigInt

Source§

fn sample_below(upper: &Self) -> Self

Generates random number within [0; upper) range Read more
Source§

fn sample_range(lower: &Self, upper: &Self) -> Self

Generates random number within [lower; upper) range Read more
Source§

fn strict_sample_range(lower: &Self, upper: &Self) -> Self

Generates random number within (lower; upper) range Read more
Source§

fn sample(bit_size: usize) -> Self

Generates number within [0; 2^bit_size) range
Source§

fn strict_sample(bit_size: usize) -> Self

Generates number within [2^(bit_size-1); 2^bit_size) range
Source§

impl Serialize for BigInt

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Shl<usize> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
Source§

impl Shl<usize> for BigInt

Source§

type Output = BigInt

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
Source§

impl ShlAssign<usize> for BigInt

Source§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
Source§

impl Shr<usize> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl Shr<usize> for BigInt

Source§

type Output = BigInt

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
Source§

impl ShrAssign<usize> for BigInt

Source§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
Source§

impl Sub<&BigInt> for BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &BigInt) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&BigInt> for u64

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &BigInt) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<BigInt> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: BigInt) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<BigInt> for u64

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: BigInt) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<u64> for &BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u64) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<u64> for BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u64) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for &BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for BigInt

Source§

type Output = BigInt

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<&BigInt> for BigInt

Source§

fn sub_assign(&mut self, rhs: &BigInt)

Performs the -= operation. Read more
Source§

impl SubAssign<u64> for BigInt

Source§

fn sub_assign(&mut self, rhs: u64)

Performs the -= operation. Read more
Source§

impl SubAssign for BigInt

Source§

fn sub_assign(&mut self, rhs: BigInt)

Performs the -= operation. Read more
Source§

impl TryFrom<&BigInt> for i64

Source§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &BigInt) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&BigInt> for u64

Source§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &BigInt) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Zero for BigInt

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl Zeroize for BigInt

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl ZeroizeBN for BigInt

Source§

fn zeroize_bn(&mut self)

👎Deprecated since 0.6.0: BigInt now implements zeroize::Zeroize trait, you should use it instead
Source§

impl Eq for BigInt

Source§

impl StructuralPartialEq for BigInt

Auto Trait Implementations§

§

impl Freeze for BigInt

§

impl RefUnwindSafe for BigInt

§

impl Send for BigInt

§

impl Sync for BigInt

§

impl Unpin for BigInt

§

impl UnwindSafe for BigInt

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

Source§

impl<T> NumAssign for T
where T: Num + NumAssignOps,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T> NumAssignRef for T
where T: NumAssign + for<'r> NumAssignOps<&'r T>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> NumRef for T
where T: Num + for<'r> NumOps<&'r T>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,

Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,