pub struct Fq(/* private fields */);
Trait Implementations§
Source§impl BaseFromRO for Fq
impl BaseFromRO for Fq
Source§impl Field for Fq
impl Field for Fq
Source§fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self
fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self
Computes a uniformly random element using rejection sampling.
Source§fn add_assign(&mut self, other: &Fq)
fn add_assign(&mut self, other: &Fq)
Adds another element to this element.
Source§fn sub_assign(&mut self, other: &Fq)
fn sub_assign(&mut self, other: &Fq)
Subtracts another element from this element.
Source§fn inverse(&self) -> Option<Self>
fn inverse(&self) -> Option<Self>
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: &Fq)
fn mul_assign(&mut self, other: &Fq)
Multiplies another element by this element.
Source§impl Ord for Fq
impl Ord for Fq
Elements are ordered lexicographically.
Source§impl PartialOrd for Fq
impl PartialOrd for Fq
Source§impl PrimeField for Fq
impl PrimeField for Fq
Source§const CAPACITY: u32 = 380u32
const CAPACITY: u32 = 380u32
How many bits of information can be reliably stored in the field element.
Source§type Repr = FqRepr
type Repr = FqRepr
The prime field can be converted back and forth into this biginteger
representation.
Source§fn from_repr(r: FqRepr) -> Result<Fq, PrimeFieldDecodingError>
fn from_repr(r: FqRepr) -> Result<Fq, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
Source§fn into_repr(&self) -> FqRepr
fn into_repr(&self) -> FqRepr
Convert a biginteger representation into a prime field element, if
the number is an element of the field.
Source§fn multiplicative_generator() -> Self
fn multiplicative_generator() -> Self
Returns the multiplicative generator of
char()
- 1 order. This element
must also be quadratic nonresidue.Source§fn root_of_unity() -> Self
fn root_of_unity() -> Self
Returns the 2^s root of unity computed by exponentiating the
multiplicative_generator()
by t.Source§impl Signum0 for Fq
impl Signum0 for Fq
Source§fn sgn0(&self) -> Sgn0Result
fn sgn0(&self) -> Sgn0Result
Returns either Negative or NonNegative
Source§fn negate_if(&mut self, sgn: Sgn0Result)
fn negate_if(&mut self, sgn: Sgn0Result)
Negate if the argument is Negative
impl Copy for Fq
impl Eq for Fq
Auto Trait Implementations§
impl Freeze for Fq
impl RefUnwindSafe for Fq
impl Send for Fq
impl Sync for Fq
impl Unpin for Fq
impl UnwindSafe for Fq
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)