pub trait EncodePem: Encode + PemLabel {
    fn encode_pem<'o>(
        &self,
        line_ending: LineEnding,
        out: &'o mut [u8]
    ) -> Result<&'o str, Self::Error>; fn encode_pem_string(
        &self,
        line_ending: LineEnding
    ) -> Result<String, Self::Error>; }
Available on crate feature pem only.
Expand description

Encoding trait for PEM documents.

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

Required Methods

Encode this type using the Encode trait, writing the resulting PEM document into the provided out buffer.

Available on crate feature alloc only.

Encode this type using the Encode trait, writing the resulting PEM document to a returned String.

Implementors