pub enum LoginQrCodeDecodeError {
NotEnoughData(Error),
NotUtf8(Utf8Error),
UrlParse(ParseError),
InvalidMode(u8),
InvalidVersion(u8),
Base64(Base64DecodeError),
InvalidPrefix {
expected: &'static [u8],
got: [u8; 6],
},
}
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(Base64DecodeError)
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)>
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: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
Converts to this type from the input type.
source§impl From<Error> for LoginQrCodeDecodeError
impl From<Error> for LoginQrCodeDecodeError
source§impl From<ParseError> for LoginQrCodeDecodeError
impl From<ParseError> for LoginQrCodeDecodeError
source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
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 more