Struct pairing_ce::bn256::fr::Fr
source · pub struct Fr(_);
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Fr
impl<'de> Deserialize<'de> for Fr
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Field for Fr
impl Field for Fr
sourcefn add_assign(&mut self, other: &Fr)
fn add_assign(&mut self, other: &Fr)
Adds another element to this element.
sourcefn sub_assign(&mut self, other: &Fr)
fn sub_assign(&mut self, other: &Fr)
Subtracts another element from this element.
sourcefn inverse(&self) -> Option<Self>
fn inverse(&self) -> Option<Self>
Computes the multiplicative inverse of this element, if nonzero.
sourcefn 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. Read more
sourcefn mul_assign(&mut self, other: &Fr)
fn mul_assign(&mut self, other: &Fr)
Multiplies another element by this element.
sourceimpl Ord for Fr
impl Ord for Fr
Elements are ordered lexicographically.
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Fr> for Fr
impl PartialOrd<Fr> for Fr
sourcefn partial_cmp(&self, other: &Fr) -> Option<Ordering>
fn partial_cmp(&self, other: &Fr) -> Option<Ordering>
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 moresourceimpl 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
sourcefn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
sourcefn from_raw_repr(r: FrRepr) -> Result<Self, PrimeFieldDecodingError>
fn from_raw_repr(r: FrRepr) -> Result<Self, PrimeFieldDecodingError>
Creates an element from raw representation in Montgommery form.
sourcefn 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. Read more
sourcefn into_raw_repr(&self) -> FrRepr
fn into_raw_repr(&self) -> FrRepr
Expose Montgommery represendation.
sourceconst CAPACITY: u32 = 253u32
const CAPACITY: u32 = 253u32
How many bits of information can be reliably stored in the field element.
sourcefn multiplicative_generator() -> Self
fn multiplicative_generator() -> Self
Returns the multiplicative generator of
char()
- 1 order. This element
must also be quadratic nonresidue. Read moresourcefn root_of_unity() -> Self
fn root_of_unity() -> Self
Returns the 2^s root of unity computed by exponentiating the
multiplicative_generator()
by t. Read moreimpl Copy for Fr
impl Eq for Fr
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more