Enum rustls_pki_types::pem::SectionKind

source ·
#[non_exhaustive]
pub enum SectionKind { Certificate, PublicKey, RsaPrivateKey, PrivateKey, EcPrivateKey, Crl, Csr, EchConfigList, }
Expand description

A single recognised section in a PEM file.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Certificate

A DER-encoded x509 certificate.

Appears as “CERTIFICATE” in PEM files.

§

PublicKey

A DER-encoded Subject Public Key Info; as specified in RFC 7468.

Appears as “PUBLIC KEY” in PEM files.

§

RsaPrivateKey

A DER-encoded plaintext RSA private key; as specified in PKCS #1/RFC 3447

Appears as “RSA PRIVATE KEY” in PEM files.

§

PrivateKey

A DER-encoded plaintext private key; as specified in PKCS #8/RFC 5958

Appears as “PRIVATE KEY” in PEM files.

§

EcPrivateKey

A Sec1-encoded plaintext private key; as specified in RFC 5915

Appears as “EC PRIVATE KEY” in PEM files.

§

Crl

A Certificate Revocation List; as specified in RFC 5280

Appears as “X509 CRL” in PEM files.

§

Csr

A Certificate Signing Request; as specified in RFC 2986

Appears as “CERTIFICATE REQUEST” in PEM files.

§

EchConfigList

An EchConfigList structure, as specified in https://www.ietf.org/archive/id/draft-farrell-tls-pemesni-05.html.

Appears as “ECHCONFIG” in PEM files.

Trait Implementations§

source§

impl Clone for SectionKind

source§

fn clone(&self) -> SectionKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SectionKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for SectionKind

source§

fn eq(&self, other: &SectionKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<&[u8]> for SectionKind

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(value: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for SectionKind

source§

impl StructuralPartialEq for SectionKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.