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<UT> ConvertError<UT> for LoginQrCodeDecodeError
impl<UT> ConvertError<UT> for LoginQrCodeDecodeError
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<LoginQrCodeDecodeError, Error>
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.
Source§impl<UT> Lift<UT> for LoginQrCodeDecodeError
impl<UT> Lift<UT> for LoginQrCodeDecodeError
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
§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> 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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read moreSource§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 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.