pub struct G2(/* private fields */);Expand description
A point on the BLS12-381 G2 curve.
Trait Implementations§
Source§impl Point for G2
impl Point for G2
Source§fn msm(points: &[Self], scalars: &[Scalar]) -> Self
fn msm(points: &[Self], scalars: &[Scalar]) -> Self
Performs multi-scalar multiplication (MSM) on G2 points using Pippenger’s algorithm.
Computes sum(scalars[i] * points[i]).
Filters out pairs where the point is the identity element (infinity). Returns an error if the lengths of the input slices mismatch.
Source§impl Read for G2
impl Read for G2
impl Copy for G2
impl Eq for G2
impl StructuralPartialEq for G2
Auto Trait Implementations§
impl Freeze for G2
impl RefUnwindSafe for G2
impl Send for G2
impl Sync for G2
impl Unpin for G2
impl UnwindSafe for G2
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§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> EncodeFixed for T
impl<T> EncodeFixed for T
Source§impl<T> EncodeSize for Twhere
T: FixedSize,
impl<T> EncodeSize for Twhere
T: FixedSize,
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more