pub struct OptionalNonZeroElGamalPubkey(/* private fields */);
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 for OptionalNonZeroElGamalPubkey
impl PartialEq for OptionalNonZeroElGamalPubkey
source§fn eq(&self, other: &OptionalNonZeroElGamalPubkey) -> bool
fn eq(&self, other: &OptionalNonZeroElGamalPubkey) -> bool
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 Freeze for OptionalNonZeroElGamalPubkey
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
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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