pub enum QRCodeLoginError {
OAuth(DeviceAuthorizationOAuthError),
LoginFailure {
reason: LoginFailureReason,
homeserver: Option<Url>,
},
UnexpectedMessage {
expected: &'static str,
received: QrAuthMessage,
},
SecureChannel(SecureChannelError),
CrossProcessRefreshLock(CrossProcessRefreshLockError),
UserIdDiscovery(HttpError),
SessionTokens(Error),
DeviceKeyUpload(Error),
SecretImport(SecretImportError),
ServerReset(Error),
}e2e-encryption only.Expand description
The error type for failures while trying to log in a new device using a QR code.
Variants§
OAuth(DeviceAuthorizationOAuthError)
An error happened while we were communicating with the OAuth 2.0 authorization server.
LoginFailure
The other device has signaled to us that the login has failed.
Fields
reason: LoginFailureReasonThe reason, as signaled by the other device, for the login failure.
UnexpectedMessage
An unexpected message was received from the other device.
Fields
received: QrAuthMessageThe message we received instead.
SecureChannel(SecureChannelError)
An error happened while exchanging messages with the other device.
CrossProcessRefreshLock(CrossProcessRefreshLockError)
The cross-process refresh lock failed to be initialized.
UserIdDiscovery(HttpError)
An error happened while we were trying to discover our user and device ID, after we have acquired an access token from the OAuth 2.0 authorization server.
SessionTokens(Error)
We failed to set the session tokens after we figured out our device and user IDs.
DeviceKeyUpload(Error)
The device keys failed to be uploaded after we successfully logged in.
SecretImport(SecretImportError)
The secrets bundle we received from the existing device failed to be imported.
ServerReset(Error)
The other party told us to use a different homeserver but we failed to reset the server URL.
Trait Implementations§
Source§impl<UT> ConvertError<UT> for QRCodeLoginError
impl<UT> ConvertError<UT> for QRCodeLoginError
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for QRCodeLoginError
impl Debug for QRCodeLoginError
Source§impl Display for QRCodeLoginError
impl Display for QRCodeLoginError
Source§impl Error for QRCodeLoginError
impl Error for QRCodeLoginError
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<CrossProcessRefreshLockError> for QRCodeLoginError
impl From<CrossProcessRefreshLockError> for QRCodeLoginError
Source§fn from(source: CrossProcessRefreshLockError) -> Self
fn from(source: CrossProcessRefreshLockError) -> Self
Source§impl From<DeviceAuthorizationOAuthError> for QRCodeLoginError
impl From<DeviceAuthorizationOAuthError> for QRCodeLoginError
Source§fn from(source: DeviceAuthorizationOAuthError) -> Self
fn from(source: DeviceAuthorizationOAuthError) -> Self
Source§impl From<SecretImportError> for QRCodeLoginError
impl From<SecretImportError> for QRCodeLoginError
Source§fn from(source: SecretImportError) -> Self
fn from(source: SecretImportError) -> Self
Source§impl From<SecureChannelError> for QRCodeLoginError
impl From<SecureChannelError> for QRCodeLoginError
Source§fn from(source: SecureChannelError) -> Self
fn from(source: SecureChannelError) -> Self
Source§impl<UT> Lift<UT> for QRCodeLoginError
impl<UT> Lift<UT> for QRCodeLoginError
type FfiType = RustBuffer
fn try_read(buf: &mut &[u8]) -> Result<Self>
fn try_lift(v: RustBuffer) -> Result<Self>
Source§fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
Source§impl<UT> Lower<UT> for QRCodeLoginError
impl<UT> Lower<UT> for QRCodeLoginError
type FfiType = RustBuffer
fn write(obj: Self, buf: &mut Vec<u8>)
fn lower(obj: Self) -> RustBuffer
Source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Source§impl<UT> LowerError<UT> for QRCodeLoginError
impl<UT> LowerError<UT> for QRCodeLoginError
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> TypeId<UT> for QRCodeLoginError
impl<UT> TypeId<UT> for QRCodeLoginError
Auto Trait Implementations§
impl Freeze for QRCodeLoginError
impl !RefUnwindSafe for QRCodeLoginError
impl Send for QRCodeLoginError
impl Sync for QRCodeLoginError
impl Unpin for QRCodeLoginError
impl !UnwindSafe for QRCodeLoginError
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
§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>
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>
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)
&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)
&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, 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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> Pointable for T
impl<T> Pointable for T
Source§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.