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
experimental-oidc
and crate feature e2e-encryption
and non-WebAssembly 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<UT> ConvertError<UT> for LoginQrCodeDecodeError
impl<UT> ConvertError<UT> for LoginQrCodeDecodeError
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: 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.
source§impl<UT> Lift<UT> for LoginQrCodeDecodeError
impl<UT> Lift<UT> for LoginQrCodeDecodeError
type FfiType = RustBuffer
fn try_read(buf: &mut &[u8]) -> Result<LoginQrCodeDecodeError, Error>
fn try_lift(v: RustBuffer) -> Result<LoginQrCodeDecodeError, Error>
source§fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
Convenience method
source§impl<UT> Lower<UT> for LoginQrCodeDecodeError
impl<UT> Lower<UT> for LoginQrCodeDecodeError
type FfiType = RustBuffer
fn write(obj: LoginQrCodeDecodeError, buf: &mut Vec<u8>)
fn lower(obj: LoginQrCodeDecodeError) -> RustBuffer
source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Convenience method
source§impl<UT> LowerError<UT> for LoginQrCodeDecodeError
impl<UT> LowerError<UT> for LoginQrCodeDecodeError
source§fn lower_error(obj: LoginQrCodeDecodeError) -> RustBuffer
fn lower_error(obj: LoginQrCodeDecodeError) -> RustBuffer
Lower this value for scaffolding function return Read more
source§impl<UT> TypeId<UT> for LoginQrCodeDecodeError
impl<UT> TypeId<UT> for LoginQrCodeDecodeError
const TYPE_ID_META: MetadataBuffer = _
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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>
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