std.crypto.pem.Item
class pub enum Item
A value/section parsed from a PEM file.
Constructors
Certificate
Certificate(Certificate)
An X.509 certificate.
PrivateKey
PrivateKey(PrivateKey)
An X.509 private key.
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 Item) -> Bool {
match (self, other) {
case (Certificate(a), Certificate(b)) -> a == b
case (PrivateKey(a), PrivateKey(b)) -> a == b
case _ -> false
}
}
fn pub ==(other: ref Item) -> 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 Certificate(v) -> formatter.tuple('Certificate').field(v).finish
case PrivateKey(v) -> formatter.tuple('PrivateKey').field(v).finish
}
}
fn pub fmt(formatter: mut Formatter)
Formats self
in a human-readable format for debugging purposes.
Implemented traits
Equal
impl Equal[ref Item] for Item
Format
impl Format for Item