Struct snarkvm_fields::Fp2 [−][src]
pub struct Fp2<P: Fp2Parameters> { pub c0: P::Fp, pub c1: P::Fp, }
Fields
c0: P::Fpc1: P::FpImplementations
Trait Implementations
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Reads Self from reader.
fn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<Self, SerializationError> where
R: Read,
fn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<Self, SerializationError> where
R: Read,
Reads Self from reader without compression.
fn deserialize_with_flags<R: Read, F: Flags>(
reader: &mut R
) -> Result<(Self, F), SerializationError>
fn deserialize_with_flags<R: Read, F: Flags>(
reader: &mut R
) -> Result<(Self, F), SerializationError>
Reads Self and Flags from reader.
Returns empty flags by default. Read more
Serializes self into writer.
fn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write,
fn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write,
Serializes self into writer without compression.
fn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: &mut W,
flags: F
) -> Result<(), SerializationError>
fn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: &mut W,
flags: F
) -> Result<(), SerializationError>
Serializes self and flags into writer.
impl<'de, P: Fp2Parameters> Deserialize<'de> for Fp2<P> where
P::Fp: Deserialize<'de>,
P::Fp: Deserialize<'de>,
impl<'de, P: Fp2Parameters> Deserialize<'de> for Fp2<P> where
P::Fp: Deserialize<'de>,
P::Fp: Deserialize<'de>,
fn 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
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as
the source of randomness. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Returns the characteristic of the field.
Doubles self in place.
Returns a field element with an extra sign bit used for group parsing if the set of bytes forms a valid field element, otherwise returns None. This function is primarily intended for sampling random field elements from a hash-function or RNG output. Read more
Returns a field element if the set of bytes forms a valid field element, otherwise returns None. This function is primarily intended for sampling random field elements from a hash-function or RNG output. Read more
Squares self in place.
Computes the multiplicative inverse of self if self is nonzero.
Sets self to self’s inverse if it exists. Otherwise it is a no-op.
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Fp2 elements are ordered lexicographically.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Returns the Legendre symbol.
Sets self to be the square root of self, if it exists.
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Auto Trait Implementations
impl<P> RefUnwindSafe for Fp2<P> where
<P as Fp2Parameters>::Fp: RefUnwindSafe,
impl<P> Unpin for Fp2<P> where
<P as Fp2Parameters>::Fp: Unpin,
impl<P> UnwindSafe for Fp2<P> where
<P as Fp2Parameters>::Fp: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more