pub trait DecodePem: DecodeOwned + PemLabel {
    // Required method
    fn from_pem(pem: impl AsRef<[u8]>) -> Result<Self, Error>;
}
Available on crate features pkcs8 and pem only.
Expand description

PEM decoding trait.

This trait is automatically impl’d for any type which impls both DecodeOwned and PemLabel.

Required Methods§

fn from_pem(pem: impl AsRef<[u8]>) -> Result<Self, Error>

Try to decode this type from PEM.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> DecodePem for T
where T: DecodeOwned + PemLabel,