Trait snarkvm_fields::PrimeField [−][src]
pub trait PrimeField: FftField<FftParameters = Self::Parameters> + FromStr { type Parameters: FieldParameters<BigInteger = Self::BigInteger>; type BigInteger: BigInteger; fn from_repr(repr: Self::BigInteger) -> Option<Self>; fn to_repr(&self) -> Self::BigInteger; fn from_repr_unchecked(repr: Self::BigInteger) -> Self; fn to_repr_unchecked(&self) -> Self::BigInteger; fn size_in_bits() -> usize { ... } fn trace() -> Self::BigInteger { ... } fn trace_minus_one_div_two() -> Self::BigInteger { ... } fn modulus_minus_one_div_two() -> Self::BigInteger { ... } }
Expand description
The interface for a prime field.
Associated Types
type Parameters: FieldParameters<BigInteger = Self::BigInteger>
type BigInteger: BigInteger
Required methods
fn from_repr(repr: Self::BigInteger) -> Option<Self>
fn from_repr(repr: Self::BigInteger) -> Option<Self>
Returns a prime field element from its underlying representation.
fn to_repr(&self) -> Self::BigInteger
fn to_repr(&self) -> Self::BigInteger
Returns the underlying representation of the prime field element.
fn from_repr_unchecked(repr: Self::BigInteger) -> Self
fn from_repr_unchecked(repr: Self::BigInteger) -> Self
Returns a prime field element from its underlying raw representation.
fn to_repr_unchecked(&self) -> Self::BigInteger
fn to_repr_unchecked(&self) -> Self::BigInteger
Returns the underlying raw representation of the prime field element.
Provided methods
fn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the field size in bits.
fn trace() -> Self::BigInteger
fn trace() -> Self::BigInteger
Returns the trace.
fn trace_minus_one_div_two() -> Self::BigInteger
fn trace_minus_one_div_two() -> Self::BigInteger
Returns the trace minus one divided by two.
fn modulus_minus_one_div_two() -> Self::BigInteger
fn modulus_minus_one_div_two() -> Self::BigInteger
Returns the modulus minus one divided by two.