pub enum SecureChannelError {
Decryption(DecryptionError),
MessageDecode(MessageDecodeError),
SecureChannelMessage {
expected: &'static str,
received: String,
},
InvalidCheckCode,
RendezvousChannel(HttpError),
InvalidIntent,
CannotReceiveCheckCode,
UnsupportedQrCodeType,
}Available on crate feature
e2e-encryption only.Expand description
Error type for failures in when receiving or sending messages over the secure channel.
Variants§
Decryption(DecryptionError)
A message has failed to be decrypted.
MessageDecode(MessageDecodeError)
A received message has failed to be decoded.
SecureChannelMessage
The secure channel failed to be established because it received an unexpected message.
Fields
InvalidCheckCode
The secure channel could not have been established, the check code was invalid.
RendezvousChannel(HttpError)
An error happened in the underlying rendezvous channel.
InvalidIntent
Both devices have advertised the same intent in the login attempt, i.e. both sides claim to be a new device.
CannotReceiveCheckCode
The secure channel could not have been established, the check code cannot be received.
UnsupportedQrCodeType
The QR code specifies an unsupported protocol version.
Trait Implementations§
Source§impl Debug for SecureChannelError
impl Debug for SecureChannelError
Source§impl Display for SecureChannelError
impl Display for SecureChannelError
Source§impl Error for SecureChannelError
impl Error for SecureChannelError
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<DecryptionError> for SecureChannelError
impl From<DecryptionError> for SecureChannelError
Source§fn from(source: DecryptionError) -> Self
fn from(source: DecryptionError) -> Self
Converts to this type from the input type.
Source§impl From<HttpError> for SecureChannelError
impl From<HttpError> for SecureChannelError
Source§impl From<MessageDecodeError> for SecureChannelError
impl From<MessageDecodeError> for SecureChannelError
Source§fn from(source: MessageDecodeError) -> Self
fn from(source: MessageDecodeError) -> Self
Converts to this type from the input type.
Source§impl From<SecureChannelError> for QRCodeLoginError
impl From<SecureChannelError> for QRCodeLoginError
Source§fn from(e: SecureChannelError) -> Self
fn from(e: SecureChannelError) -> Self
Converts to this type from the input type.
Source§impl From<SecureChannelError> for QRCodeGrantLoginError
impl From<SecureChannelError> for QRCodeGrantLoginError
Source§fn from(e: SecureChannelError) -> Self
fn from(e: SecureChannelError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SecureChannelError
impl !UnwindSafe for SecureChannelError
impl Freeze for SecureChannelError
impl Send for SecureChannelError
impl Sync for SecureChannelError
impl Unpin for SecureChannelError
impl UnsafeUnpin for SecureChannelError
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
impl<T> AsyncTraitDeps for T
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> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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