#[repr(transparent)]pub struct OptionalNonZeroElGamalPubkey(_);
Expand description
An ElGamalPubkey that encodes None
as all 0
, meant to be usable as a Pod type.
Implementations§
source§impl OptionalNonZeroElGamalPubkey
impl OptionalNonZeroElGamalPubkey
sourcepub fn equals(&self, other: &ElGamalPubkey) -> bool
pub fn equals(&self, other: &ElGamalPubkey) -> bool
Checks equality between an OptionalNonZeroElGamalPubkey and an ElGamalPubkey when interpreted as bytes.
Trait Implementations§
source§impl Clone for OptionalNonZeroElGamalPubkey
impl Clone for OptionalNonZeroElGamalPubkey
source§fn clone(&self) -> OptionalNonZeroElGamalPubkey
fn clone(&self) -> OptionalNonZeroElGamalPubkey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OptionalNonZeroElGamalPubkey
impl Debug for OptionalNonZeroElGamalPubkey
source§impl Default for OptionalNonZeroElGamalPubkey
impl Default for OptionalNonZeroElGamalPubkey
source§fn default() -> OptionalNonZeroElGamalPubkey
fn default() -> OptionalNonZeroElGamalPubkey
Returns the “default value” for a type. Read more
source§impl From<OptionalNonZeroElGamalPubkey> for Option<ElGamalPubkey>
impl From<OptionalNonZeroElGamalPubkey> for Option<ElGamalPubkey>
source§fn from(p: OptionalNonZeroElGamalPubkey) -> Self
fn from(p: OptionalNonZeroElGamalPubkey) -> Self
Converts to this type from the input type.
source§impl PartialEq<OptionalNonZeroElGamalPubkey> for OptionalNonZeroElGamalPubkey
impl PartialEq<OptionalNonZeroElGamalPubkey> for OptionalNonZeroElGamalPubkey
source§fn eq(&self, other: &OptionalNonZeroElGamalPubkey) -> bool
fn eq(&self, other: &OptionalNonZeroElGamalPubkey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<Option<ElGamalPubkey>> for OptionalNonZeroElGamalPubkey
impl TryFrom<Option<ElGamalPubkey>> for OptionalNonZeroElGamalPubkey
§type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
impl Copy for OptionalNonZeroElGamalPubkey
impl Pod for OptionalNonZeroElGamalPubkey
impl StructuralPartialEq for OptionalNonZeroElGamalPubkey
Auto Trait Implementations§
impl RefUnwindSafe for OptionalNonZeroElGamalPubkey
impl Send for OptionalNonZeroElGamalPubkey
impl Sync for OptionalNonZeroElGamalPubkey
impl Unpin for OptionalNonZeroElGamalPubkey
impl UnwindSafe for OptionalNonZeroElGamalPubkey
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,
§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
.