std.crypto.pem.ParseError
class pub enum ParseError
An error produced while parsing a PEM file.
Constructors
Read
Read(Error)
An IO error occurred while reading data to parse.
InvalidSectionStart
InvalidSectionStart(Int)
The start of a PEM section is invalid, e.g. it's missing the closing
-----
.
InvalidSectionEnd
InvalidSectionEnd(Int)
The end of a PEM section is invalid, e.g. its name doesn't match the name of the opening section.
InvalidBase64
InvalidBase64(Int)
The base64 encoded data inside a PEM section is invalid.
Instance methods
!=
Show source codeHide source code
fn pub !=(other: T) -> Bool {
(self == other).false?
}
fn pub !=(other: T) -> Bool
Returns true
if self
and the given object are not equal to each other.
==
Show source codeHide source code
fn pub ==(other: ref ParseError) -> Bool {
match (self, other) {
case (Read(a), Read(b)) -> a == b
case (InvalidSectionStart(a), InvalidSectionStart(b)) -> a == b
case (InvalidSectionEnd(a), InvalidSectionEnd(b)) -> a == b
case (InvalidBase64(a), InvalidBase64(b)) -> a == b
case _ -> false
}
}
fn pub ==(other: ref ParseError) -> Bool
Returns true
if self
and the given object are equal to each other.
This operator is used to perform structural equality. This means two objects residing in different memory locations may be considered equal, provided their structure is equal. For example, two different arrays may be considered to have structural equality if they contain the exact same values.
fmt
Show source codeHide source code
fn pub fmt(formatter: mut Formatter) {
match self {
case Read(e) -> formatter.tuple('Read').field(e).finish
case InvalidSectionStart(v) -> {
formatter.tuple('InvalidSectionStart').field(v).finish
}
case InvalidSectionEnd(v) -> {
formatter.tuple('InvalidSectionEnd').field(v).finish
}
case InvalidBase64(a) -> formatter.tuple('InvalidBase64').field(a).finish
}
}
fn pub fmt(formatter: mut Formatter)
Formats self
in a human-readable format for debugging purposes.
Implemented traits
Equal
impl Equal[ref ParseError] for ParseError
Format
impl Format for ParseError