Struct pkcs8::PublicKeyDocument
source · [−]pub struct PublicKeyDocument(_);
Expand description
SPKI public key document.
This type provides storage for SubjectPublicKeyInfo
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
sourceimpl PublicKeyDocument
impl PublicKeyDocument
sourcepub fn spki(&self) -> SubjectPublicKeyInfo<'_>
pub fn spki(&self) -> SubjectPublicKeyInfo<'_>
Parse the SubjectPublicKeyInfo
contained in this PublicKeyDocument
sourcepub fn from_der(bytes: &[u8]) -> Result<Self>
pub fn from_der(bytes: &[u8]) -> Result<Self>
Parse PublicKeyDocument
from ASN.1 DER.
Trait Implementations
sourceimpl AsRef<[u8]> for PublicKeyDocument
impl AsRef<[u8]> for PublicKeyDocument
sourceimpl Clone for PublicKeyDocument
impl Clone for PublicKeyDocument
sourcefn clone(&self) -> PublicKeyDocument
fn clone(&self) -> PublicKeyDocument
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PublicKeyDocument
impl Debug for PublicKeyDocument
sourceimpl From<&SubjectPublicKeyInfo<'_>> for PublicKeyDocument
impl From<&SubjectPublicKeyInfo<'_>> for PublicKeyDocument
sourcefn from(spki: &SubjectPublicKeyInfo<'_>) -> PublicKeyDocument
fn from(spki: &SubjectPublicKeyInfo<'_>) -> PublicKeyDocument
Converts to this type from the input type.
sourceimpl From<SubjectPublicKeyInfo<'_>> for PublicKeyDocument
impl From<SubjectPublicKeyInfo<'_>> for PublicKeyDocument
sourcefn from(spki: SubjectPublicKeyInfo<'_>) -> PublicKeyDocument
fn from(spki: SubjectPublicKeyInfo<'_>) -> PublicKeyDocument
Converts to this type from the input type.
sourceimpl TryFrom<&[u8]> for PublicKeyDocument
impl TryFrom<&[u8]> for PublicKeyDocument
Auto Trait Implementations
impl RefUnwindSafe for PublicKeyDocument
impl Send for PublicKeyDocument
impl Sync for PublicKeyDocument
impl Unpin for PublicKeyDocument
impl UnwindSafe for PublicKeyDocument
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more