跳到主要内容

SectionKind

搜索

枚举 SectionKind 

Source
#[non_exhaustive]
pub enum SectionKind { Certificate, PublicKey, RsaPrivateKey, PrivateKey, EcPrivateKey, Crl, Csr, EchConfigList, }
展开描述

PEM 文件中某个被识别的 section。

变体 (Non-exhaustive)§

This enum is marked as non-exhaustive
非穷尽枚举未来可能添加新的变体。因此,在对非穷尽枚举的变体进行模式匹配时,必须额外增加一个通配符分支以涵盖未来的新变体。
§

Certificate

一个 DER 编码的 x509 证书。

在 PEM 文件中显示为 "CERTIFICATE"。

§

PublicKey

一个 DER 编码的 Subject Public Key Info(主体公钥信息),如 RFC 7468 所规定。

在 PEM 文件中显示为 "PUBLIC KEY"。

§

RsaPrivateKey

一个 DER 编码的明文 RSA 私钥,如 PKCS #1 / RFC 3447 所规定

在 PEM 文件中显示为 "RSA PRIVATE KEY"。

§

PrivateKey

一个 DER 编码的明文私钥,如 PKCS #8 / RFC 5958 所规定

在 PEM 文件中显示为 "PRIVATE KEY"。

§

EcPrivateKey

一个 Sec1 编码的明文私钥,如 RFC 5915 所规定

在 PEM 文件中显示为 "EC PRIVATE KEY"。

§

Crl

一个证书吊销列表(CRL),如 RFC 5280 所规定

在 PEM 文件中显示为 "X509 CRL"。

§

Csr

一个证书签名请求(CSR),如 RFC 2986 所规定

在 PEM 文件中显示为 "CERTIFICATE REQUEST"。

§

EchConfigList

一个 EchConfigList 结构,如 https://www.ietf.org/archive/id/draft-farrell-tls-pemesni-05.html 所规定。

在 PEM 文件中显示为 "ECHCONFIG"。

trait 实现§

Source§

impl Clone for SectionKind

Source§

fn clone(&self) -> SectionKind

返回该值的一个副本。更多信息
1.0.0 · Source§

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

Performs copy-assignment from source. 更多信息
Source§

impl Debug for SectionKind

Source§

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

使用给定的格式化器格式化该值。更多信息
Source§

impl PartialEq for SectionKind

Source§

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

测试 selfother 值是否相等,供 == 使用。
1.0.0 · Source§

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

测试 != 运算符。默认实现几乎总是够用,除非有非常充分的理由,否则不应被覆盖。
Source§

impl TryFrom<&[u8]> for SectionKind

Source§

type Error = ()

转换出错时返回的类型。
Source§

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

执行转换。
Source§

impl Copy for SectionKind

Source§

impl StructuralPartialEq for SectionKind

自动 trait 实现§

blanket 实现§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. 更多信息
Source§

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

Source§

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

Mutably borrows from an owned value. 更多信息
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 更多信息
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回参数。

Source§

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

Source§

fn into(self) -> U

调用 U::from(self)

即此转换的实际行为取决于 From<T> for U 的实现。

Source§

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

Source§

type Owned = T

获得所有权后的类型。
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. 更多信息
Source§

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

Uses borrowed data to replace owned data, usually by cloning. 更多信息
Source§

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

Source§

type Error = Infallible

转换出错时返回的类型。
Source§

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

执行转换。
Source§

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

Source§

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

转换出错时返回的类型。
Source§

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

执行转换。