pub struct Fr(/* private fields */);Implementations§
Trait Implementations§
impl Copy for Fr
impl Eq for Fr
Source§impl Field for Fr
impl Field for Fr
Source§fn add_assign(&mut self, other: &Fr)
fn add_assign(&mut self, other: &Fr)
Adds another element to this element.
Source§fn sub_assign(&mut self, other: &Fr)
fn sub_assign(&mut self, other: &Fr)
Subtracts another element from this element.
Source§fn inverse(&self) -> Option<Fr>
fn inverse(&self) -> Option<Fr>
Computes the multiplicative inverse of this element, if nonzero.
Source§fn frobenius_map(&mut self, _: usize)
fn frobenius_map(&mut self, _: usize)
Exponentiates this element by a power of the base prime modulus via
the Frobenius automorphism.
Source§fn mul_assign(&mut self, other: &Fr)
fn mul_assign(&mut self, other: &Fr)
Multiplies another element by this element.
Source§impl MulAssign<Fr> for Poly
impl MulAssign<Fr> for Poly
Source§fn mul_assign(&mut self, rhs: Fr)
fn mul_assign(&mut self, rhs: Fr)
Performs the
*= operation. Read moreSource§impl Ord for Fr
Elements are ordered lexicographically.
impl Ord for Fr
Elements are ordered lexicographically.
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Fr
impl PartialOrd for Fr
Source§impl PrimeField for Fr
impl PrimeField for Fr
Source§const NUM_BITS: u32 = MODULUS_BITS
const NUM_BITS: u32 = MODULUS_BITS
How many bits are needed to represent an element of this field.
Source§type Repr = FrRepr
type Repr = FrRepr
The prime field can be converted back and forth into this biginteger
representation.
Source§fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
Source§fn from_raw_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
fn from_raw_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Creates an element from raw representation in Montgommery form.
Source§fn into_repr(&self) -> FrRepr
fn into_repr(&self) -> FrRepr
Convert a biginteger representation into a prime field element, if
the number is an element of the field.
Source§fn into_raw_repr(&self) -> FrRepr
fn into_raw_repr(&self) -> FrRepr
Expose Montgommery represendation.
Source§fn multiplicative_generator() -> Fr
fn multiplicative_generator() -> Fr
Returns the multiplicative generator of
char() - 1 order. This element
must also be quadratic nonresidue.Source§fn root_of_unity() -> Fr
fn root_of_unity() -> Fr
Returns the 2^s root of unity computed by exponentiating the
multiplicative_generator()
by t.Auto Trait Implementations§
impl Freeze for Fr
impl RefUnwindSafe for Fr
impl Send for Fr
impl Sync for Fr
impl Unpin for Fr
impl UnsafeUnpin for Fr
impl UnwindSafe for Fr
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