Skip to main content

PemLabel

Trait PemLabel 

Source
pub trait PemLabel {
    const PEM_LABEL: &'static str;

    // Provided method
    fn validate_pem_label(actual: &str) -> Result<(), Error> { ... }
}
Expand description

Marker trait for types with an associated PEM type label.

Required Associated Constants§

Source

const PEM_LABEL: &'static str

Expected PEM type label for a given document, e.g. "PRIVATE KEY"

Provided Methods§

Source

fn validate_pem_label(actual: &str) -> Result<(), Error>

Validate that a given label matches the expected label.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<Params, Key, PubKey> PemLabel for PrivateKeyInfo<Params, Key, PubKey>

Available on crate feature pem only.
Source§

const PEM_LABEL: &'static str = "PRIVATE KEY"

Source§

impl<Params, Key> PemLabel for SubjectPublicKeyInfo<Params, Key>

Available on crate feature pem only.
Source§

const PEM_LABEL: &'static str = "PUBLIC KEY"