pub struct PublicKey { /* private fields */ }
Expand description
A public key for key agreement.
Implementations§
Trait Implementations§
Source§impl AsBigEndian<EcPublicKeyCompressedBin<'static>> for PublicKey
impl AsBigEndian<EcPublicKeyCompressedBin<'static>> for PublicKey
Source§fn as_be_bytes(&self) -> Result<EcPublicKeyCompressedBin<'static>, Unspecified>
fn as_be_bytes(&self) -> Result<EcPublicKeyCompressedBin<'static>, Unspecified>
Provides the public key elliptic curve point to a compressed point format.
§Errors
Returns an error if the underlying implementation is unable to marshal the public key to this format.
Source§impl AsBigEndian<EcPublicKeyUncompressedBin<'static>> for PublicKey
impl AsBigEndian<EcPublicKeyUncompressedBin<'static>> for PublicKey
Source§fn as_be_bytes(
&self,
) -> Result<EcPublicKeyUncompressedBin<'static>, Unspecified>
fn as_be_bytes( &self, ) -> Result<EcPublicKeyUncompressedBin<'static>, Unspecified>
Provides the public key elliptic curve point to a compressed point format.
Equivalent to PublicKey::as_ref
for ECDH key types, except that it provides you a copy instead of a reference.
§Errors
Returns an error if the underlying implementation is unable to marshal the public key to this format.
Source§impl AsDer<PublicKeyX509Der<'static>> for PublicKey
impl AsDer<PublicKeyX509Der<'static>> for PublicKey
Source§fn as_der(&self) -> Result<PublicKeyX509Der<'static>, Unspecified>
fn as_der(&self) -> Result<PublicKeyX509Der<'static>, Unspecified>
Provides the public key as a DER-encoded (X.509) SubjectPublicKeyInfo
structure.
§Errors
Returns an error if the public key fails to marshal to X.509.
impl Send for PublicKey
impl Sync for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
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