pub enum SecureChannelError {
Utf8(Utf8Error),
Ecies(EciesError),
MessageDecode(MessageDecodeError),
Json(Error),
SecureChannelMessage {
expected: &'static str,
received: String,
},
InvalidCheckCode,
RendezvousChannel(HttpError),
InvalidIntent,
CannotReceiveCheckCode,
}e2e-encryption only.Expand description
Error type for failures in when receiving or sending messages over the secure channel.
Variants§
Utf8(Utf8Error)
A message we received over the secure channel was not a valid UTF-8 encoded string.
Ecies(EciesError)
A message has failed to be decrypted.
MessageDecode(MessageDecodeError)
A received message has failed to be decoded.
Json(Error)
A message couldn’t be deserialized from JSON.
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.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for SecureChannelError
impl From<Error> for SecureChannelError
Source§fn from(source: EciesError) -> Self
fn from(source: EciesError) -> Self
Source§impl From<Error> for SecureChannelError
impl From<Error> for SecureChannelError
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
Source§impl From<SecureChannelError> for QRCodeGrantLoginError
impl From<SecureChannelError> for QRCodeGrantLoginError
Source§fn from(e: SecureChannelError) -> Self
fn from(e: SecureChannelError) -> Self
Source§impl From<SecureChannelError> for QRCodeLoginError
impl From<SecureChannelError> for QRCodeLoginError
Source§fn from(e: SecureChannelError) -> Self
fn from(e: SecureChannelError) -> Self
Auto Trait Implementations§
impl Freeze for SecureChannelError
impl !RefUnwindSafe for SecureChannelError
impl Send for SecureChannelError
impl Sync for SecureChannelError
impl Unpin for SecureChannelError
impl !UnwindSafe for SecureChannelError
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
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>
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>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.