pub struct Fr(_);
Trait Implementations
sourceimpl Field for Fr
impl Field for Fr
sourcepub fn random<R>(rng: &mut R) -> Fr where
R: RngCore + ?Sized,
pub fn random<R>(rng: &mut R) -> Fr where
R: RngCore + ?Sized,
Computes a uniformly random element using rejection sampling.
sourcepub fn add_assign(&mut self, other: &Fr)
pub fn add_assign(&mut self, other: &Fr)
Adds another element to this element.
sourcepub fn sub_assign(&mut self, other: &Fr)
pub fn sub_assign(&mut self, other: &Fr)
Subtracts another element from this element.
sourcepub fn inverse(&self) -> Option<Fr>
pub fn inverse(&self) -> Option<Fr>
Computes the multiplicative inverse of this element, if nonzero.
sourcepub fn frobenius_map(&mut self, usize)
pub fn frobenius_map(&mut self, usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
sourcepub fn mul_assign(&mut self, other: &Fr)
pub fn mul_assign(&mut self, other: &Fr)
Multiplies another element by this element.
sourceimpl MulAssign<Fr> for Poly
impl MulAssign<Fr> for Poly
sourcefn mul_assign(&mut self, rhs: Fr)
fn mul_assign(&mut self, rhs: Fr)
Performs the *=
operation. Read more
sourceimpl Ord for Fr
impl Ord for Fr
Elements are ordered lexicographically.
sourceimpl PartialOrd<Fr> for Fr
impl PartialOrd<Fr> for Fr
sourcepub fn partial_cmp(&self, other: &Fr) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Fr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PrimeField for Fr
impl PrimeField for Fr
type Repr = FrRepr
type Repr = FrRepr
The prime field can be converted back and forth into this biginteger representation. Read more
sourcepub fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
pub fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
sourcepub fn into_repr(&self) -> FrRepr
pub fn into_repr(&self) -> FrRepr
Convert a biginteger representation into a prime field element, if the number is an element of the field. Read more
sourcepub const CAPACITY: u32
pub const CAPACITY: u32
How many bits of information can be reliably stored in the field element.
sourcepub fn multiplicative_generator() -> Fr
pub fn multiplicative_generator() -> Fr
Returns the multiplicative generator of char()
- 1 order. This element
must also be quadratic nonresidue. Read more
sourcepub fn root_of_unity() -> Fr
pub fn root_of_unity() -> Fr
Returns the 2^s root of unity computed by exponentiating the multiplicative_generator()
by t. Read more
impl Copy for Fr
impl Eq for Fr
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more