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
Required Methods§
Sourcefn decode_pem(pem: impl AsRef<[u8]>) -> Result<Self, Self::Error>
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.
§Errors
- Returns
Error::Pemin the event of PEM decoding errors. - Propagates errors returned from the
Decode::decodemethod.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.