Enum matrix_sdk_base::ruma::api::error::DeserializationError
source · #[non_exhaustive]pub enum DeserializationError {
Utf8(Utf8Error),
Json(Error),
Query(Error),
Ident(Error),
Header(HeaderDeserializationError),
MultipartMixed(MultipartMixedDeserializationError),
}
Available on crate feature
api
only.Expand description
An error when converting a http request / response to one of ruma’s endpoint-specific request / response types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Utf8(Utf8Error)
Encountered invalid UTF-8.
Json(Error)
JSON deserialization failed.
Query(Error)
Query parameter deserialization failed.
Ident(Error)
Got an invalid identifier.
Header(HeaderDeserializationError)
Header value deserialization failed.
MultipartMixed(MultipartMixedDeserializationError)
Deserialization of multipart/mixed
response failed.
Trait Implementations§
source§impl Debug for DeserializationError
impl Debug for DeserializationError
source§impl Display for DeserializationError
impl Display for DeserializationError
source§impl Error for DeserializationError
impl Error for DeserializationError
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<Error> for DeserializationError
impl From<Error> for DeserializationError
source§fn from(source: Error) -> DeserializationError
fn from(source: Error) -> DeserializationError
Converts to this type from the input type.
source§impl From<Error> for DeserializationError
impl From<Error> for DeserializationError
source§fn from(source: Error) -> DeserializationError
fn from(source: Error) -> DeserializationError
Converts to this type from the input type.
source§impl From<HeaderDeserializationError> for DeserializationError
impl From<HeaderDeserializationError> for DeserializationError
source§fn from(source: HeaderDeserializationError) -> DeserializationError
fn from(source: HeaderDeserializationError) -> DeserializationError
Converts to this type from the input type.
source§impl From<Error> for DeserializationError
impl From<Error> for DeserializationError
source§fn from(source: Error) -> DeserializationError
fn from(source: Error) -> DeserializationError
Converts to this type from the input type.
source§impl From<Infallible> for DeserializationError
impl From<Infallible> for DeserializationError
source§fn from(err: Infallible) -> DeserializationError
fn from(err: Infallible) -> DeserializationError
Converts to this type from the input type.
source§impl From<MultipartMixedDeserializationError> for DeserializationError
impl From<MultipartMixedDeserializationError> for DeserializationError
source§fn from(source: MultipartMixedDeserializationError) -> DeserializationError
fn from(source: MultipartMixedDeserializationError) -> DeserializationError
Converts to this type from the input type.
source§impl From<ToStrError> for DeserializationError
impl From<ToStrError> for DeserializationError
source§fn from(err: ToStrError) -> DeserializationError
fn from(err: ToStrError) -> DeserializationError
Converts to this type from the input type.
source§impl From<Utf8Error> for DeserializationError
impl From<Utf8Error> for DeserializationError
source§fn from(source: Utf8Error) -> DeserializationError
fn from(source: Utf8Error) -> DeserializationError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeserializationError
impl !RefUnwindSafe for DeserializationError
impl Send for DeserializationError
impl Sync for DeserializationError
impl Unpin for DeserializationError
impl !UnwindSafe for DeserializationError
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, 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