pub trait IsPairing {
type G1Point: IsGroup;
type G2Point: IsGroup;
type OutputField: IsField;
// Required method
fn compute_batch(
pairs: &[(&Self::G1Point, &Self::G2Point)],
) -> Result<FieldElement<Self::OutputField>, PairingError>;
// Provided method
fn compute(
p: &Self::G1Point,
q: &Self::G2Point,
) -> Result<FieldElement<Self::OutputField>, PairingError> { ... }
}Required Associated Types§
Required Methods§
Sourcefn compute_batch(
pairs: &[(&Self::G1Point, &Self::G2Point)],
) -> Result<FieldElement<Self::OutputField>, PairingError>
fn compute_batch( pairs: &[(&Self::G1Point, &Self::G2Point)], ) -> Result<FieldElement<Self::OutputField>, PairingError>
Compute the product of the pairings for a list of point pairs. More efficient than just calling the pairing for each pair of points individually
Provided Methods§
Sourcefn compute(
p: &Self::G1Point,
q: &Self::G2Point,
) -> Result<FieldElement<Self::OutputField>, PairingError>
fn compute( p: &Self::G1Point, q: &Self::G2Point, ) -> Result<FieldElement<Self::OutputField>, PairingError>
Compute the ate pairing between point p in G1 and q in G2.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.