std.net.tls.ServerConfigError
class pub enum ServerConfigError
An error produced when creating a ServerConfig
.
Constructors
InvalidCertificate
InvalidCertificate()
The certificate exists but is invalid, such as when it's revoked or not encoded correctly.
InvalidPrivateKey
InvalidPrivateKey()
The private key exists but 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 ServerConfigError) -> Bool {
match (self, other) {
case (InvalidCertificate, InvalidCertificate) -> true
case (InvalidPrivateKey, InvalidPrivateKey) -> true
case _ -> false
}
}
fn pub ==(other: ref ServerConfigError) -> 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 InvalidCertificate -> formatter.tuple('InvalidCertificate').finish
case InvalidPrivateKey -> formatter.tuple('InvalidPrivateKey').finish
}
}
fn pub fmt(formatter: mut Formatter)
Formats self
in a human-readable format for debugging purposes.
to_string
Show source codeHide source code
fn pub to_string -> String {
match self {
case InvalidCertificate -> 'the certificate is invalid'
case InvalidPrivateKey -> 'the private key is invalid'
}
}
fn pub to_string -> String
Converts self
to a String
.
Implemented traits
Equal
impl Equal[ref ServerConfigError] for ServerConfigError
Format
impl Format for ServerConfigError
ToString
impl ToString for ServerConfigError