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

source§

fn borrow(&self) -> &ProtoBasedErrorCode

Immutably borrows from an owned value. Read more
source§

impl Clone for ProtoBasedErrorCode

source§

fn clone(&self) -> ProtoBasedErrorCode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ProtoBasedErrorCode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ProtoBasedErrorCode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

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

Converts to this type from the input type.
source§

impl From<&ProtoBasedErrorCode> for ErrorKind

Implements Into<sandwich_proto::ErrorKind> for ProtoBasedErrorCode.

source§

fn from(ec: &ProtoBasedErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<ALPNError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: ALPNError) -> Self

Converts to this type from the input type.
source§

impl From<APIError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: APIError) -> Self

Converts to this type from the input type.
source§

impl From<ASN1Error> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: ASN1Error) -> Self

Converts to this type from the input type.
source§

impl From<CertificateError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: CertificateError) -> Self

Converts to this type from the input type.
source§

impl From<ConfigurationError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: ConfigurationError) -> Self

Converts to this type from the input type.
source§

impl From<DataSourceError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: DataSourceError) -> Self

Converts to this type from the input type.
source§

impl From<HandshakeError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: HandshakeError) -> Self

Converts to this type from the input type.
source§

impl From<KEMError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: KEMError) -> Self

Converts to this type from the input type.
source§

impl From<PrivateKeyError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: PrivateKeyError) -> Self

Converts to this type from the input type.
source§

impl From<ProtoBasedErrorCode> for Error

Instantiates an Error from an ProtoBasedErrorCode.

source§

fn from(e: ProtoBasedErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<ProtoBasedErrorCode> for ErrorCode

Instantiates an ErrorCode by consuming a ProtoBasedErrorCode.

source§

fn from(ec: ProtoBasedErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<ProtobufError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: ProtobufError) -> Self

Converts to this type from the input type.
source§

impl From<SocketError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: SocketError) -> Self

Converts to this type from the input type.
source§

impl From<SystemError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: SystemError) -> Self

Converts to this type from the input type.
source§

impl From<TLSConfigurationError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: TLSConfigurationError) -> Self

Converts to this type from the input type.
source§

impl From<TunnelError> for ProtoBasedErrorCode

Implements [From<sandwich_proto::ErrorEnum>] for ProtoBasedErrorCode.

source§

fn from(v: TunnelError) -> Self

Converts to this type from the input type.
source§

impl PartialEq<ALPNError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ALPNError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<APIError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &APIError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ASN1Error> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ASN1Error) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<CertificateError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &CertificateError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ConfigurationError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ConfigurationError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<DataSourceError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &DataSourceError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<HandshakeError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &HandshakeError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<KEMError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &KEMError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<PrivateKeyError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &PrivateKeyError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for ALPNError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for APIError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for ASN1Error

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for CertificateError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for ConfigurationError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for DataSourceError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for HandshakeError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for KEMError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for PrivateKeyError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for ProtoBasedErrorCode

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for ProtobufError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for SocketError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for SystemError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for TLSConfigurationError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtoBasedErrorCode> for TunnelError

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtoBasedErrorCode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<ProtobufError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &ProtobufError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<SocketError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &SocketError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<SystemError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &SystemError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<TLSConfigurationError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &TLSConfigurationError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<TunnelError> for ProtoBasedErrorCode

Implements comparison operator between ProtoBasedErrorCode and the current error enum.

source§

fn eq(&self, other: &TunnelError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Shr<ProtoBasedErrorCode> for Error

Appends an Error into the chain, using the >> operator.

§

type Output = Error

The resulting type after applying the >> operator.
source§

fn shr(self, e: ProtoBasedErrorCode) -> Self::Output

Performs the >> operation. Read more
source§

impl TryFrom<(i32, i32)> for ProtoBasedErrorCode

Implements TryFrom for ProtoBasedErrorCode.

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from((kind, ec): (i32, i32)) -> Result<Self>

Performs the conversion.
source§

impl Eq for ProtoBasedErrorCode

source§

impl StructuralEq for ProtoBasedErrorCode

source§

impl StructuralPartialEq for ProtoBasedErrorCode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.