Struct pairing::bls12_381::Fq
[−]
[src]
pub struct Fq(_);
Trait Implementations
impl Copy for Fq
[src]
impl Clone for Fq
[src]
fn clone(&self) -> Fq
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Fq
[src]
fn eq(&self, __arg_0: &Fq) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fq) -> bool
This method tests for !=
.
impl Eq for Fq
[src]
impl Debug for Fq
[src]
impl Ord for Fq
[src]
Fq
elements are ordered lexicographically.
fn cmp(&self, other: &Fq) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl PartialOrd for Fq
[src]
fn partial_cmp(&self, other: &Fq) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Display for Fq
[src]
impl Rand for Fq
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
Generates a random instance of this type using the specified source of randomness. Read more
impl PrimeField for Fq
[src]
type Repr = FqRepr
The prime field can be converted back and forth into this biginteger representation. Read more
fn from_repr(r: FqRepr) -> Result<Fq, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
fn into_repr(&self) -> FqRepr
Convert a biginteger representation into a prime field element, if the number is an element of the field. Read more
fn char() -> FqRepr
Returns the field characteristic; the modulus.
fn num_bits() -> u32
Returns how many bits are needed to represent an element of this field. Read more
fn capacity() -> u32
Returns how many bits of information can be reliably stored in the field element. Read more
fn multiplicative_generator() -> Self
Returns the multiplicative generator of char()
- 1 order. This element must also be quadratic nonresidue. Read more
fn s() -> u32
Returns s such that 2s * t = char()
- 1 with t odd.
fn root_of_unity() -> Self
Returns the 2s root of unity computed by exponentiating the multiplicative_generator()
by t. Read more
fn from_str(s: &str) -> Option<Self>
Interpret a string of numbers as a (congruent) prime field element. Does not accept unnecessary leading zeroes or a blank string. Read more
impl Field for Fq
[src]
fn zero() -> Self
Returns the zero element of the field, the additive identity.
fn one() -> Self
Returns the one element of the field, the multiplicative identity.
fn is_zero(&self) -> bool
Returns true iff this element is zero.
fn add_assign(&mut self, other: &Fq)
Adds another element to this element.
fn double(&mut self)
Doubles this element.
fn sub_assign(&mut self, other: &Fq)
Subtracts another element from this element.
fn negate(&mut self)
Negates this element.
fn inverse(&self) -> Option<Self>
Computes the multiplicative inverse of this element, if nonzero.
fn frobenius_map(&mut self, _: usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
fn mul_assign(&mut self, other: &Fq)
Multiplies another element by this element.
fn square(&mut self)
Squares this element.
fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self
Exponentiates this element by a number represented with u64
limbs, least significant digit first. Read more