Skip to main content

PemEncode

Trait PemEncode 

pub trait PemEncode {
    // Required methods
    fn pem_label(&self) -> &'static str;
    fn pem_der(&self) -> &[u8] ;

    // Provided methods
    fn pem(&self) -> PemBlock<'_> { ... }
    fn to_pem(&self) -> String { ... }
}
Available on crate features crypto and std only.
Expand description

DER objects that carry the PEM label RFC 7468 assigns them.

Required Methods§

fn pem_label(&self) -> &'static str

The label between -----BEGIN and -----.

fn pem_der(&self) -> &[u8]

The DER bytes the block encodes.

Provided Methods§

fn pem(&self) -> PemBlock<'_>

This object as a block to write wherever it is needed.

fn to_pem(&self) -> String

This object as one PEM block in a new String.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§