pub enum ProteusErrorKind {
ProteusDecodeError(DecodeError),
ProteusEncodeError(EncodeError),
ProteusInternalError(ProteusError),
ProteusSessionError(Error<CryptoKeystoreError>),
Leaf(LeafError),
}
Expand description
Proteus produces these kinds of error
Variants§
ProteusDecodeError(DecodeError)
Error when decoding CBOR and/or decrypting Proteus messages
ProteusEncodeError(EncodeError)
Error when encoding CBOR and/or decrypting Proteus messages
ProteusInternalError(ProteusError)
Various internal Proteus errors
ProteusSessionError(Error<CryptoKeystoreError>)
Error when there’s a critical error within a proteus Session
Leaf(LeafError)
Common errors we generate
Implementations§
source§impl ProteusErrorKind
impl ProteusErrorKind
sourcepub fn error_code(&self) -> Option<u16>
pub fn error_code(&self) -> Option<u16>
Returns the proteus error code
Trait Implementations§
source§impl Debug for ProteusErrorKind
impl Debug for ProteusErrorKind
source§impl Display for ProteusErrorKind
impl Display for ProteusErrorKind
source§impl Error for ProteusErrorKind
impl Error for ProteusErrorKind
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<'_derivative_strum> From<&'_derivative_strum ProteusErrorKind> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum ProteusErrorKind> for &'static str
source§fn from(x: &'_derivative_strum ProteusErrorKind) -> &'static str
fn from(x: &'_derivative_strum ProteusErrorKind) -> &'static str
Converts to this type from the input type.
source§impl From<DecodeError> for ProteusErrorKind
impl From<DecodeError> for ProteusErrorKind
source§impl From<EncodeError> for ProteusErrorKind
impl From<EncodeError> for ProteusErrorKind
source§impl From<SessionError<CryptoKeystoreError>> for ProteusErrorKind
impl From<SessionError<CryptoKeystoreError>> for ProteusErrorKind
source§fn from(source: Error<CryptoKeystoreError>) -> Self
fn from(source: Error<CryptoKeystoreError>) -> Self
Converts to this type from the input type.
source§impl From<LeafError> for ProteusErrorKind
impl From<LeafError> for ProteusErrorKind
source§impl From<ProteusError> for ProteusErrorKind
impl From<ProteusError> for ProteusErrorKind
source§impl From<ProteusErrorKind> for &'static str
impl From<ProteusErrorKind> for &'static str
source§fn from(x: ProteusErrorKind) -> &'static str
fn from(x: ProteusErrorKind) -> &'static str
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProteusErrorKind
impl !RefUnwindSafe for ProteusErrorKind
impl Send for ProteusErrorKind
impl Sync for ProteusErrorKind
impl Unpin for ProteusErrorKind
impl !UnwindSafe for ProteusErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moresource§impl<E> InnermostErrorMessage for Ewhere
E: Error,
impl<E> InnermostErrorMessage for Ewhere
E: Error,
source§fn innermost_error_message(&self) -> String
fn innermost_error_message(&self) -> String
Produce the error message from the innermost wrapped error.
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more