Struct SubjectPublicKeyInfoDer

struct SubjectPublicKeyInfoDer<'a>(_)

A DER-encoded SubjectPublicKeyInfo (SPKI), as specified in RFC 5280.

Public keys are identified in PEM context as a PUBLIC KEY.

# #[cfg(all(feature = "alloc", feature = "std"))] {
use rustls_pki_types::{SubjectPublicKeyInfoDer, pem::PemObject};

// load from a PEM file
SubjectPublicKeyInfoDer::from_pem_file("tests/data/spki.pem").unwrap();

// or from a PEM byte slice...
# let byte_slice = include_bytes!("../tests/data/spki.pem");
SubjectPublicKeyInfoDer::from_pem_slice(byte_slice).unwrap();
# }

Implementations

impl SubjectPublicKeyInfoDer<'_>

fn into_owned(self: Self) -> SubjectPublicKeyInfoDer<'static>

Converts this SubjectPublicKeyInfo into its owned variant, unfreezing borrowed content (if any)

impl AsRef for SubjectPublicKeyInfoDer<'_>

fn as_ref(self: &Self) -> &[u8]

impl Deref for SubjectPublicKeyInfoDer<'_>

fn deref(self: &Self) -> &<Self as >::Target

impl From for SubjectPublicKeyInfoDer<'_>

fn from(vec: Vec<u8>) -> Self

impl<'a> Clone for SubjectPublicKeyInfoDer<'a>

fn clone(self: &Self) -> SubjectPublicKeyInfoDer<'a>

impl<'a> Debug for SubjectPublicKeyInfoDer<'a>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<'a> Eq for SubjectPublicKeyInfoDer<'a>

impl<'a> Freeze for SubjectPublicKeyInfoDer<'a>

impl<'a> From for SubjectPublicKeyInfoDer<'a>

fn from(slice: &'a [u8]) -> Self

impl<'a> PartialEq for SubjectPublicKeyInfoDer<'a>

fn eq(self: &Self, other: &SubjectPublicKeyInfoDer<'a>) -> bool

impl<'a> RefUnwindSafe for SubjectPublicKeyInfoDer<'a>

impl<'a> Send for SubjectPublicKeyInfoDer<'a>

impl<'a> StructuralPartialEq for SubjectPublicKeyInfoDer<'a>

impl<'a> Sync for SubjectPublicKeyInfoDer<'a>

impl<'a> Unpin for SubjectPublicKeyInfoDer<'a>

impl<'a> UnwindSafe for SubjectPublicKeyInfoDer<'a>

impl<P, T> Receiver for SubjectPublicKeyInfoDer<'a>

impl<T> Any for SubjectPublicKeyInfoDer<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SubjectPublicKeyInfoDer<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SubjectPublicKeyInfoDer<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for SubjectPublicKeyInfoDer<'a>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for SubjectPublicKeyInfoDer<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> PemObject for SubjectPublicKeyInfoDer<'a>

fn from_pem(kind: SectionKind, der: Vec<u8>) -> Option<T>

impl<T> ToOwned for SubjectPublicKeyInfoDer<'a>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for SubjectPublicKeyInfoDer<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for SubjectPublicKeyInfoDer<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for SubjectPublicKeyInfoDer<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>