pub enum LoginQrCodeDecodeError {
NotEnoughData(Error),
NotUtf8(Utf8Error),
UrlParse(ParseError),
InvalidMode(u8),
InvalidVersion(u8),
Base64(DecodeError),
InvalidPrefix {
expected: &'static [u8],
got: [u8; 6],
},
}Available on crate feature
e2e-encryption only.Expand description
Error type for the decoding of the QrCodeData.
Variants§
NotEnoughData(Error)
The QR code data is no long enough, it’s missing some fields.
NotUtf8(Utf8Error)
One of the URLs in the QR code data is not a valid UTF-8 encoded string.
UrlParse(ParseError)
One of the URLs in the QR code data could not be parsed.
InvalidMode(u8)
The QR code data contains an invalid mode, we expect the login (0x03) mode or the reciprocate mode (0x04).
InvalidVersion(u8)
The QR code data contains an unsupported version.
Base64(DecodeError)
The base64 encoded variant of the QR code data is not a valid base64 string.
InvalidPrefix
The QR code data doesn’t contain the expected MATRIX prefix.
Trait Implementations§
Source§impl Debug for LoginQrCodeDecodeError
impl Debug for LoginQrCodeDecodeError
Source§impl Display for LoginQrCodeDecodeError
impl Display for LoginQrCodeDecodeError
Source§impl Error for LoginQrCodeDecodeError
impl Error for LoginQrCodeDecodeError
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<DecodeError> for LoginQrCodeDecodeError
impl From<DecodeError> for LoginQrCodeDecodeError
Source§fn from(source: DecodeError) -> LoginQrCodeDecodeError
fn from(source: DecodeError) -> LoginQrCodeDecodeError
Converts to this type from the input type.
Source§impl From<Error> for LoginQrCodeDecodeError
impl From<Error> for LoginQrCodeDecodeError
Source§fn from(source: Error) -> LoginQrCodeDecodeError
fn from(source: Error) -> LoginQrCodeDecodeError
Converts to this type from the input type.
Source§impl From<ParseError> for LoginQrCodeDecodeError
impl From<ParseError> for LoginQrCodeDecodeError
Source§fn from(source: ParseError) -> LoginQrCodeDecodeError
fn from(source: ParseError) -> LoginQrCodeDecodeError
Converts to this type from the input type.
Source§impl From<Utf8Error> for LoginQrCodeDecodeError
impl From<Utf8Error> for LoginQrCodeDecodeError
Source§fn from(source: Utf8Error) -> LoginQrCodeDecodeError
fn from(source: Utf8Error) -> LoginQrCodeDecodeError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LoginQrCodeDecodeError
impl !RefUnwindSafe for LoginQrCodeDecodeError
impl Send for LoginQrCodeDecodeError
impl Sync for LoginQrCodeDecodeError
impl Unpin for LoginQrCodeDecodeError
impl !UnwindSafe for LoginQrCodeDecodeError
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
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 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.