pub enum ProteusError {
ProteusDecodeError(DecodeError),
ProteusEncodeError(EncodeError),
ProteusInternalError(ProteusError),
ProteusSessionError(Error<CryptoKeystoreError>),
}
Expand description
Wrapper for Proteus-related errors
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
Implementations§
source§impl ProteusError
impl ProteusError
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 ProteusError
impl Debug for ProteusError
source§impl Display for ProteusError
impl Display for ProteusError
source§impl Error for ProteusError
impl Error for ProteusError
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 ProteusError> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum ProteusError> for &'static str
source§fn from(x: &'_derivative_strum ProteusError) -> &'static str
fn from(x: &'_derivative_strum ProteusError) -> &'static str
Converts to this type from the input type.
source§impl From<DecodeError> for ProteusError
impl From<DecodeError> for ProteusError
source§impl From<EncodeError> for ProteusError
impl From<EncodeError> for ProteusError
source§impl From<SessionError<CryptoKeystoreError>> for ProteusError
impl From<SessionError<CryptoKeystoreError>> for ProteusError
source§fn from(source: Error<CryptoKeystoreError>) -> Self
fn from(source: Error<CryptoKeystoreError>) -> Self
Converts to this type from the input type.
source§impl From<ProteusError> for &'static str
impl From<ProteusError> for &'static str
source§fn from(x: ProteusError) -> &'static str
fn from(x: ProteusError) -> &'static str
Converts to this type from the input type.
source§impl From<ProteusError> for CryptoError
impl From<ProteusError> for CryptoError
source§fn from(source: ProteusError) -> Self
fn from(source: ProteusError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProteusError
impl !RefUnwindSafe for ProteusError
impl Send for ProteusError
impl Sync for ProteusError
impl Unpin for ProteusError
impl !UnwindSafe for ProteusError
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<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