pub struct PublicKey<G: Group + ?Sized>(/* private fields */);Expand description
Wrapper around a Key to enforce that it’s a public one.
Implementations§
Source§impl<G: Group> PublicKey<G>
impl<G: Group> PublicKey<G>
Sourcepub fn deserialize(key_bytes: &[u8]) -> Result<Self, ProtocolError>
pub fn deserialize(key_bytes: &[u8]) -> Result<Self, ProtocolError>
Convert from bytes
Sourcepub fn serialize(&self) -> GenericArray<u8, G::PkLen>
pub fn serialize(&self) -> GenericArray<u8, G::PkLen>
Convert to bytes
Sourcepub fn to_group_type(&self) -> &G::Pk
pub fn to_group_type(&self) -> &G::Pk
Returns the inner Group::Pk.
Trait Implementations§
Source§impl<'de, G: Group + ?Sized> Deserialize<'de> for PublicKey<G>where
G::Pk: Deserialize<'de>,
impl<'de, G: Group + ?Sized> Deserialize<'de> for PublicKey<G>where
G::Pk: Deserialize<'de>,
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
impl<G: Group + ?Sized> Eq for PublicKey<G>
Source§impl<G: Group + ?Sized> Ord for PublicKey<G>
impl<G: Group + ?Sized> Ord for PublicKey<G>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<G: Group + ?Sized> PartialOrd for PublicKey<G>where
G::Pk: PartialOrd,
impl<G: Group + ?Sized> PartialOrd for PublicKey<G>where
G::Pk: PartialOrd,
Auto Trait Implementations§
impl<G> Freeze for PublicKey<G>
impl<G> RefUnwindSafe for PublicKey<G>
impl<G> Send for PublicKey<G>
impl<G> Sync for PublicKey<G>
impl<G> Unpin for PublicKey<G>
impl<G> UnsafeUnpin for PublicKey<G>
impl<G> UnwindSafe for PublicKey<G>
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