pub enum ProteusErrorKind {
ProteusDecodeError(DecodeError),
ProteusEncodeError(EncodeError),
ProteusInternalError(ProteusError),
ProteusSessionError(Error<CryptoKeystoreError>),
SessionNotFound(String),
}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
SessionNotFound(String)
No session exists for the given session id
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 From<DecodeError> for ProteusErrorKind
impl From<DecodeError> for ProteusErrorKind
Source§impl From<EncodeError> for ProteusErrorKind
impl From<EncodeError> for ProteusErrorKind
Source§impl From<ProteusError> for ProteusErrorKind
impl From<ProteusError> 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.
Auto Trait Implementations§
impl !RefUnwindSafe for ProteusErrorKind
impl !UnwindSafe for ProteusErrorKind
impl Freeze for ProteusErrorKind
impl Send for ProteusErrorKind
impl Sync for ProteusErrorKind
impl Unpin for ProteusErrorKind
impl UnsafeUnpin 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> ErasedDestructor for Twhere
T: 'static,
Source§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