pub struct CompactPublicKey { /* private fields */ }Available on crate feature
integer only.Expand description
A more compact public key
Compared to the PublicKey, this one is much smaller however it supports less parameters.
Implementations§
source§impl CompactPublicKey
impl CompactPublicKey
sourcepub fn new(client_key: &ClientKey) -> Self
pub fn new(client_key: &ClientKey) -> Self
Creates a CompactPublicKey, derived from the given client key
§Panic
This will panic if parameters are not compatible
pub fn try_new(client_key: &ClientKey) -> Result<Self, Error>
pub fn into_raw_parts(self) -> (CompactPublicKey, Tag)
pub fn from_raw_parts(key: CompactPublicKey, tag: Tag) -> Self
Trait Implementations§
source§impl Clone for CompactPublicKey
impl Clone for CompactPublicKey
source§fn clone(&self) -> CompactPublicKey
fn clone(&self) -> CompactPublicKey
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 CompactPublicKey
impl Debug for CompactPublicKey
source§impl<'de> Deserialize<'de> for CompactPublicKey
impl<'de> Deserialize<'de> for CompactPublicKey
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Named for CompactPublicKey
impl Named for CompactPublicKey
source§impl ParameterSetConformant for CompactPublicKey
impl ParameterSetConformant for CompactPublicKey
type ParameterSet = CompactPublicKeyEncryptionParameters
fn is_conformant(&self, parameter_set: &Self::ParameterSet) -> bool
source§impl Serialize for CompactPublicKey
impl Serialize for CompactPublicKey
source§impl Tagged for CompactPublicKey
impl Tagged for CompactPublicKey
source§impl Unversionize for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
impl Unversionize for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
source§fn unversionize(
versioned: Self::VersionedOwned,
) -> Result<Self, UnversionizeError>
fn unversionize( versioned: Self::VersionedOwned, ) -> Result<Self, UnversionizeError>
Creates an object from a versioned enum, and eventually upgrades from previous
variants.
source§impl UnversionizeVec for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
impl UnversionizeVec for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
fn unversionize_vec( versioned: Self::VersionedVec, ) -> Result<Vec<Self>, UnversionizeError>
source§impl Upgrade<CompactPublicKey> for CompactPublicKeyV0
impl Upgrade<CompactPublicKey> for CompactPublicKeyV0
type Error = Infallible
fn upgrade(self) -> Result<CompactPublicKey, Self::Error>
source§impl Version for CompactPublicKeywhere
IntegerCompactPublicKey: VersionizeOwned + Unversionize + Versionize,
Tag: VersionizeOwned + Unversionize + Versionize,
impl Version for CompactPublicKeywhere
IntegerCompactPublicKey: VersionizeOwned + Unversionize + Versionize,
Tag: VersionizeOwned + Unversionize + Versionize,
source§impl Versionize for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
impl Versionize for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
source§type Versioned<'vers> = <CompactPublicKeyVersions as VersionsDispatch<CompactPublicKey>>::Ref<'vers>
type Versioned<'vers> = <CompactPublicKeyVersions as VersionsDispatch<CompactPublicKey>>::Ref<'vers>
The equivalent versioned type. It should have a variant for each version.
It may own the underlying data or only hold a read-only reference to it.
source§fn versionize(&self) -> Self::Versioned<'_>
fn versionize(&self) -> Self::Versioned<'_>
Wraps the object into a versioned enum with a variant for each version. This will
use references on the underlying types if possible.
source§impl VersionizeOwned for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
impl VersionizeOwned for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
type VersionedOwned = <CompactPublicKeyVersions as VersionsDispatch<CompactPublicKey>>::Owned
source§fn versionize_owned(self) -> Self::VersionedOwned
fn versionize_owned(self) -> Self::VersionedOwned
Wraps the object into a versioned enum with a variant for each version. This will
clone the underlying types.
source§impl VersionizeSlice for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
impl VersionizeSlice for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
type VersionedSlice<'vers> = Vec<<CompactPublicKey as Versionize>::Versioned<'vers>>
fn versionize_slice(slice: &[Self]) -> Self::VersionedSlice<'_>
source§impl VersionizeVec for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
impl VersionizeVec for CompactPublicKeywhere
CompactPublicKeyVersions: VersionsDispatch<Self>,
type VersionedVec = Vec<<CompactPublicKey as VersionizeOwned>::VersionedOwned>
fn versionize_vec(vec: Vec<Self>) -> Self::VersionedVec
Auto Trait Implementations§
impl Freeze for CompactPublicKey
impl RefUnwindSafe for CompactPublicKey
impl Send for CompactPublicKey
impl Sync for CompactPublicKey
impl Unpin for CompactPublicKey
impl UnwindSafe for CompactPublicKey
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§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