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