[][src]Struct pkcs8::PublicKeyDocument

pub struct PublicKeyDocument(_);
This is supported on crate feature alloc only.

SPKI public key document

This type provides storage for a SPKI public key encoded as ASN.1 DER with the invariant that the contained-document is "well-formed", i.e. it will parse successfully according to this crate's parsing rules.

Implementations

impl PublicKeyDocument[src]

pub fn from_der(bytes: &[u8]) -> Result<Self>[src]

Parse PublicKeyDocument from ASN.1 DER

pub fn from_pem(s: &str) -> Result<Self>[src]

This is supported on crate feature pem only.

Parse PublicKeyDocument from PEM

PEM-encoded public keys can be identified by the leading delimiter:

-----BEGIN PUBLIC KEY-----

pub fn spki(&self) -> SubjectPublicKeyInfo<'_>[src]

Parse the SubjectPublicKeyInfo contained in this PublicKeyDocument

Trait Implementations

impl AsRef<[u8]> for PublicKeyDocument[src]

impl Clone for PublicKeyDocument[src]

impl Debug for PublicKeyDocument[src]

impl FromStr for PublicKeyDocument[src]

This is supported on crate feature pem only.

type Err = Error

The associated error which can be returned from parsing.

impl<'_> TryFrom<&'_ [u8]> for PublicKeyDocument[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.