#[non_exhaustive]pub enum KeyError {
Transport(String),
NoReady,
NoTrustAnchors,
NoInstallId,
PinMismatch(&'static str),
Trust(String),
Device(DeviceError),
Refused {
status: u16,
reason: Option<String>,
},
Session(String),
Closed,
}Expand description
Why the key session failed (the errors codes in brackets).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Transport(String)
The door or the client could not be set up.
NoReady
The call socket closed before READY, or READY was unreadable.
NoTrustAnchors
READY carried no trust anchors (call_keys).
NoInstallId
No install id (neither READY nor the config).
PinMismatch(&'static str)
A pinned server key changed (ca_pin_mismatch). Only reset_device clears the pins.
Trust(String)
READY’s trust anchors are malformed.
Device(DeviceError)
The device store or enrolment failed.
Refused
The server refused the key join for good (e2ee_refused).
Session(String)
The MLS session could not start or failed.
Closed
The key session is closed.
Implementations§
Trait Implementations§
impl Eq for KeyError
Source§impl Error for KeyError
impl Error for KeyError
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<DeviceError> for KeyError
impl From<DeviceError> for KeyError
Source§fn from(source: DeviceError) -> Self
fn from(source: DeviceError) -> Self
Converts to this type from the input type.
Source§impl From<SocketError> for KeyError
impl From<SocketError> for KeyError
Source§fn from(e: SocketError) -> Self
fn from(e: SocketError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for KeyError
impl From<TransportError> for KeyError
Source§fn from(e: TransportError) -> Self
fn from(e: TransportError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for KeyError
Auto Trait Implementations§
impl Forget for KeyError
impl Freeze for KeyError
impl Move for KeyError
impl RefUnwindSafe for KeyError
impl Send for KeyError
impl Sync for KeyError
impl Unpin for KeyError
impl UnsafeUnpin for KeyError
impl UnwindSafe for KeyError
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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