#[repr(transparent)]pub struct PodG1(pub [u8; 64]);
Expand description
The BN254 (BN128) group element in G1 as a POD type.
A group element in G1 consists of two field elements (x, y)
. A PodG1
type expects a group element to be encoded as [le(x), le(y)]
where
le(..)
is the little-endian encoding of the input field element as used
in the ark-bn254
crate. Note that this differs from the EIP-197 standard,
which specifies that the field elements are encoded as big-endian.
The Solana syscalls still expect the inputs to be encoded in big-endian as
specified in EIP-197. The type PodG1
is an intermediate type that
facilitates the translation between the EIP-197 encoding and the arkworks
implementation encoding.
Tuple Fields§
§0: [u8; 64]
Trait Implementations§
impl Copy for PodG1
impl Eq for PodG1
impl Pod for PodG1
impl StructuralPartialEq for PodG1
Auto Trait Implementations§
impl Freeze for PodG1
impl RefUnwindSafe for PodG1
impl Send for PodG1
impl Sync for PodG1
impl Unpin for PodG1
impl UnwindSafe for PodG1
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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