pub enum KeyError {
Base64Error(DecodeError),
InvalidKeyLength(usize),
Signature(SignatureError),
NonContributoryKey,
}
Expand description
Error type describing failures that can happen when we try decode or use a cryptographic key.
Variants
Base64Error(DecodeError)
InvalidKeyLength(usize)
Signature(SignatureError)
NonContributoryKey
At least one of the keys did not have contributory behaviour and the resulting shared secret would have been insecure.
Trait Implementations
sourceimpl Error for KeyError
impl Error for KeyError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<DecodeError> for KeyError
impl From<DecodeError> for KeyError
sourcefn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<KeyError> for SessionKeyDecodeError
impl From<KeyError> for SessionKeyDecodeError
sourceimpl From<KeyError> for LibolmPickleError
impl From<KeyError> for LibolmPickleError
sourceimpl From<KeyError> for DecodeError
impl From<KeyError> for DecodeError
sourceimpl From<SignatureError> for KeyError
impl From<SignatureError> for KeyError
sourcefn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for KeyError
impl Send for KeyError
impl Sync for KeyError
impl Unpin for KeyError
impl !UnwindSafe for KeyError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more