pub struct Fq2 {
pub c0: Fq,
pub c1: Fq,
}
Expand description
An element of Fq2, represented by c0 + c1 * u.
Fields§
§c0: Fq
§c1: Fq
Implementations§
Trait Implementations§
Source§impl Field for Fq2
impl Field for Fq2
Source§fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self
fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self
Returns an element chosen uniformly at random using a user-provided RNG.
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Adds another element to this element.
Source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Subtracts another element from this element.
Source§fn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Multiplies another element by 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, power: usize)
fn frobenius_map(&mut self, power: usize)
Exponentiates this element by a power of the base prime modulus via
the Frobenius automorphism.
Source§impl Ord for Fq2
impl Ord for Fq2
Fq2
elements are ordered lexicographically.
Source§impl PartialOrd for Fq2
impl PartialOrd for Fq2
Source§impl Signum0 for Fq2
impl Signum0 for Fq2
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 Fq2
impl Eq for Fq2
impl StructuralPartialEq for Fq2
Auto Trait Implementations§
impl Freeze for Fq2
impl RefUnwindSafe for Fq2
impl Send for Fq2
impl Sync for Fq2
impl Unpin for Fq2
impl UnwindSafe for Fq2
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
)