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

    // Provided method
    fn validate_pem_label(actual: &str) -> Result<(), Error> { ... }
}
Available on crate feature pkcs8 only.
Expand description

Marker trait for types with an associated PEM type label.

Required Associated Constants§

const PEM_LABEL: &'static str

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

Provided Methods§

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

Validate that a given label matches the expected label.

Object Safety§

This trait is not object safe.

Implementors§

§

impl PemLabel for PrivateKeyInfo<'_>

Available on crate feature pem only.
§

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

§

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

Available on crate feature pem only.
§

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