pub trait DecodePem: Decode + PemLabel + Sized {
    // Required method
    fn decode_pem(pem: impl AsRef<[u8]>) -> Result<Self, Self::Error>;
}
Available on crate feature pem only.
Expand description

Decoding trait for PEM documents.

This is an extension trait which is auto-impl’d for types which impl the Decode, PemLabel, and Sized traits.

Required Methods§

source

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

Decode the provided PEM-encoded string, interpreting the Base64-encoded body of the document using the Decode trait.

Implementors§