pub trait BigUintForeignFieldHelpers {
// Required methods
fn two() -> Self;
fn two_to_limb() -> Self;
fn two_to_2limb() -> Self;
fn binary_modulus() -> Self;
fn max_foreign_field_modulus<F: PrimeField>() -> Self;
fn to_limbs(&self) -> [BigUint; 3];
fn to_compact_limbs(&self) -> [BigUint; 2];
fn to_field_limbs<F: Field>(&self) -> [F; 3];
fn to_compact_field_limbs<F: Field>(&self) -> [F; 2];
fn negate(&self) -> BigUint;
}
Expand description
Foreign field helpers
Required Methods§
Sourcefn two_to_limb() -> Self
fn two_to_limb() -> Self
2^{LIMB_BITS}
Sourcefn two_to_2limb() -> Self
fn two_to_2limb() -> Self
2^{2 * LIMB_BITS}
Sourcefn binary_modulus() -> Self
fn binary_modulus() -> Self
2^t
Sourcefn max_foreign_field_modulus<F: PrimeField>() -> Self
fn max_foreign_field_modulus<F: PrimeField>() -> Self
2^259 (see foreign field multiplication RFC)
Sourcefn to_compact_limbs(&self) -> [BigUint; 2]
fn to_compact_limbs(&self) -> [BigUint; 2]
Convert to 2 limbs of 2 * LIMB_BITS each. The compressed term is the bottom part
Sourcefn to_field_limbs<F: Field>(&self) -> [F; 3]
fn to_field_limbs<F: Field>(&self) -> [F; 3]
Convert to 3 PrimeField limbs of LIMB_BITS each
Sourcefn to_compact_field_limbs<F: Field>(&self) -> [F; 2]
fn to_compact_field_limbs<F: Field>(&self) -> [F; 2]
Convert to 2 PrimeField limbs of 2 * LIMB_BITS each. The compressed term is the bottom part.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.