Enum sandwich::ProtoBasedErrorCode
source · pub enum ProtoBasedErrorCode {
Show 14 variants
APIError(APIError),
ConfigurationError(ConfigurationError),
ProtobufError(ProtobufError),
TLSConfigurationError(TLSConfigurationError),
CertificateError(CertificateError),
PrivateKeyError(PrivateKeyError),
ASN1Error(ASN1Error),
ALPNError(ALPNError),
DataSourceError(DataSourceError),
KEMError(KEMError),
SystemError(SystemError),
SocketError(SocketError),
HandshakeError(HandshakeError),
TunnelError(TunnelError),
}
Expand description
An error code.
An error code holds one of the error described in errors.proto
and listed in ErrorKind
.
Variants§
APIError(APIError)
API errors. The following errors can occur during a call to the Context API.
ConfigurationError(ConfigurationError)
Errors regarding configurations.
ProtobufError(ProtobufError)
Errors regarding protobuf.
TLSConfigurationError(TLSConfigurationError)
Errors regarding TLS configurations.
CertificateError(CertificateError)
Certificate errors.
PrivateKeyError(PrivateKeyError)
Private key errors.
ASN1Error(ASN1Error)
ASN.1 errors.
ALPNError(ALPNError)
ALPN errors.
DataSourceError(DataSourceError)
DataSource errors.
KEMError(KEMError)
KEM errors.
SystemError(SystemError)
System errors.
SocketError(SocketError)
Socket errors. These errors are used in io/socket.
HandshakeError(HandshakeError)
TunnelError(TunnelError)
Tunnel error.
Trait Implementations§
source§impl Borrow<ProtoBasedErrorCode> for ErrorCode
impl Borrow<ProtoBasedErrorCode> for ErrorCode
Implements std::borrow::Borrow
for ErrorCode
and ProtoBasedErrorCode
.
source§fn borrow(&self) -> &ProtoBasedErrorCode
fn borrow(&self) -> &ProtoBasedErrorCode
source§impl Clone for ProtoBasedErrorCode
impl Clone for ProtoBasedErrorCode
source§fn clone(&self) -> ProtoBasedErrorCode
fn clone(&self) -> ProtoBasedErrorCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProtoBasedErrorCode
impl Debug for ProtoBasedErrorCode
source§impl Display for ProtoBasedErrorCode
impl Display for ProtoBasedErrorCode
Implements std::fmt::Display
for ProtoBasedErrorCode
.
source§impl From<&ProtoBasedErrorCode> for (i32, i32)
impl From<&ProtoBasedErrorCode> for (i32, i32)
Implements [Into<(i32, i32)>
] for ProtoBasedErrorCode
.
The first i32
is the error kind, the second one is the error code.
source§fn from(ec: &ProtoBasedErrorCode) -> Self
fn from(ec: &ProtoBasedErrorCode) -> Self
source§impl From<&ProtoBasedErrorCode> for ErrorKind
impl From<&ProtoBasedErrorCode> for ErrorKind
Implements Into<sandwich_proto::ErrorKind>
for ProtoBasedErrorCode
.
source§fn from(ec: &ProtoBasedErrorCode) -> Self
fn from(ec: &ProtoBasedErrorCode) -> Self
source§impl From<ALPNError> for ProtoBasedErrorCode
impl From<ALPNError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§impl From<APIError> for ProtoBasedErrorCode
impl From<APIError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§impl From<ASN1Error> for ProtoBasedErrorCode
impl From<ASN1Error> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§impl From<CertificateError> for ProtoBasedErrorCode
impl From<CertificateError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: CertificateError) -> Self
fn from(v: CertificateError) -> Self
source§impl From<ConfigurationError> for ProtoBasedErrorCode
impl From<ConfigurationError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: ConfigurationError) -> Self
fn from(v: ConfigurationError) -> Self
source§impl From<DataSourceError> for ProtoBasedErrorCode
impl From<DataSourceError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: DataSourceError) -> Self
fn from(v: DataSourceError) -> Self
source§impl From<HandshakeError> for ProtoBasedErrorCode
impl From<HandshakeError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: HandshakeError) -> Self
fn from(v: HandshakeError) -> Self
source§impl From<KEMError> for ProtoBasedErrorCode
impl From<KEMError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§impl From<PrivateKeyError> for ProtoBasedErrorCode
impl From<PrivateKeyError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: PrivateKeyError) -> Self
fn from(v: PrivateKeyError) -> Self
source§impl From<ProtoBasedErrorCode> for Error
impl From<ProtoBasedErrorCode> for Error
Instantiates an Error
from an ProtoBasedErrorCode
.
source§fn from(e: ProtoBasedErrorCode) -> Self
fn from(e: ProtoBasedErrorCode) -> Self
source§impl From<ProtoBasedErrorCode> for ErrorCode
impl From<ProtoBasedErrorCode> for ErrorCode
Instantiates an ErrorCode
by consuming a ProtoBasedErrorCode
.
source§fn from(ec: ProtoBasedErrorCode) -> Self
fn from(ec: ProtoBasedErrorCode) -> Self
source§impl From<ProtobufError> for ProtoBasedErrorCode
impl From<ProtobufError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: ProtobufError) -> Self
fn from(v: ProtobufError) -> Self
source§impl From<SocketError> for ProtoBasedErrorCode
impl From<SocketError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: SocketError) -> Self
fn from(v: SocketError) -> Self
source§impl From<SystemError> for ProtoBasedErrorCode
impl From<SystemError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: SystemError) -> Self
fn from(v: SystemError) -> Self
source§impl From<TLSConfigurationError> for ProtoBasedErrorCode
impl From<TLSConfigurationError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: TLSConfigurationError) -> Self
fn from(v: TLSConfigurationError) -> Self
source§impl From<TunnelError> for ProtoBasedErrorCode
impl From<TunnelError> for ProtoBasedErrorCode
Implements [From<sandwich_proto::ErrorEnum>]
for ProtoBasedErrorCode
.
source§fn from(v: TunnelError) -> Self
fn from(v: TunnelError) -> Self
source§impl PartialEq<ALPNError> for ProtoBasedErrorCode
impl PartialEq<ALPNError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§impl PartialEq<APIError> for ProtoBasedErrorCode
impl PartialEq<APIError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§impl PartialEq<ASN1Error> for ProtoBasedErrorCode
impl PartialEq<ASN1Error> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§impl PartialEq<CertificateError> for ProtoBasedErrorCode
impl PartialEq<CertificateError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &CertificateError) -> bool
fn eq(&self, other: &CertificateError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ConfigurationError> for ProtoBasedErrorCode
impl PartialEq<ConfigurationError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ConfigurationError) -> bool
fn eq(&self, other: &ConfigurationError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<DataSourceError> for ProtoBasedErrorCode
impl PartialEq<DataSourceError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &DataSourceError) -> bool
fn eq(&self, other: &DataSourceError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<HandshakeError> for ProtoBasedErrorCode
impl PartialEq<HandshakeError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &HandshakeError) -> bool
fn eq(&self, other: &HandshakeError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<KEMError> for ProtoBasedErrorCode
impl PartialEq<KEMError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§impl PartialEq<PrivateKeyError> for ProtoBasedErrorCode
impl PartialEq<PrivateKeyError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &PrivateKeyError) -> bool
fn eq(&self, other: &PrivateKeyError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for ALPNError
impl PartialEq<ProtoBasedErrorCode> for ALPNError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for APIError
impl PartialEq<ProtoBasedErrorCode> for APIError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for ASN1Error
impl PartialEq<ProtoBasedErrorCode> for ASN1Error
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for CertificateError
impl PartialEq<ProtoBasedErrorCode> for CertificateError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for ConfigurationError
impl PartialEq<ProtoBasedErrorCode> for ConfigurationError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for DataSourceError
impl PartialEq<ProtoBasedErrorCode> for DataSourceError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for HandshakeError
impl PartialEq<ProtoBasedErrorCode> for HandshakeError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for KEMError
impl PartialEq<ProtoBasedErrorCode> for KEMError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for PrivateKeyError
impl PartialEq<ProtoBasedErrorCode> for PrivateKeyError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for ProtoBasedErrorCode
impl PartialEq<ProtoBasedErrorCode> for ProtoBasedErrorCode
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for ProtobufError
impl PartialEq<ProtoBasedErrorCode> for ProtobufError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for SocketError
impl PartialEq<ProtoBasedErrorCode> for SocketError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for SystemError
impl PartialEq<ProtoBasedErrorCode> for SystemError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for TLSConfigurationError
impl PartialEq<ProtoBasedErrorCode> for TLSConfigurationError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtoBasedErrorCode> for TunnelError
impl PartialEq<ProtoBasedErrorCode> for TunnelError
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtoBasedErrorCode) -> bool
fn eq(&self, other: &ProtoBasedErrorCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<ProtobufError> for ProtoBasedErrorCode
impl PartialEq<ProtobufError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &ProtobufError) -> bool
fn eq(&self, other: &ProtobufError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<SocketError> for ProtoBasedErrorCode
impl PartialEq<SocketError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &SocketError) -> bool
fn eq(&self, other: &SocketError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<SystemError> for ProtoBasedErrorCode
impl PartialEq<SystemError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &SystemError) -> bool
fn eq(&self, other: &SystemError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<TLSConfigurationError> for ProtoBasedErrorCode
impl PartialEq<TLSConfigurationError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &TLSConfigurationError) -> bool
fn eq(&self, other: &TLSConfigurationError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<TunnelError> for ProtoBasedErrorCode
impl PartialEq<TunnelError> for ProtoBasedErrorCode
Implements comparison operator between ProtoBasedErrorCode
and the current error enum.
source§fn eq(&self, other: &TunnelError) -> bool
fn eq(&self, other: &TunnelError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Shr<ProtoBasedErrorCode> for Error
impl Shr<ProtoBasedErrorCode> for Error
Appends an Error
into the chain, using the >>
operator.
source§impl TryFrom<(i32, i32)> for ProtoBasedErrorCode
impl TryFrom<(i32, i32)> for ProtoBasedErrorCode
Implements TryFrom
for ProtoBasedErrorCode
.