#[non_exhaustive]pub enum Error {
MissingSectionEnd {
end_marker: Vec<u8>,
},
IllegalSectionStart {
line: Vec<u8>,
},
Base64Decode(String),
Io(Error),
NoItemsFound,
SectionTooLarge,
}展开描述
解析 PEM 文件内容时可能发生的错误
变体 (Non-exhaustive)§
This enum is marked as non-exhaustive
非穷尽枚举未来可能添加新的变体。因此,在对非穷尽枚举的变体进行模式匹配时,必须额外增加一个通配符分支以涵盖未来的新变体。
MissingSectionEnd
某个 section 缺少 "END marker" 行
IllegalSectionStart
在开始新 section 的行中发现语法错误
Base64Decode(String)
base64 decode error
Io(Error)
I/O 错误,来自接受 std::io 类型的 API。
NoItemsFound
未找到期望类型的条目
SectionTooLarge
PEM section 超过最大允许大小 256 MB