Skip to main content

EncodePem

Trait EncodePem 

Source
pub trait EncodePem: Encode + PemLabel {
    // Required method
    fn to_pem(&self, line_ending: LineEnding) -> Result<String>;
}
Expand description

PEM encoding trait.

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

Required Methods§

Source

fn to_pem(&self, line_ending: LineEnding) -> Result<String>

Try to encode this type as PEM.

§Errors

If a PEM encoding error occurred.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> EncodePem for T
where T: Encode + PemLabel + ?Sized,

Available on crate feature pem only.