Enum ruma_common::api::error::DeserializationError
source · #[non_exhaustive]pub enum DeserializationError {
Utf8(Utf8Error),
Json(Error),
Query(Error),
Ident(IdParseError),
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(IdParseError)
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)>
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<Error> for DeserializationError
impl From<Error> for DeserializationError
source§impl From<Error> for DeserializationError
impl From<Error> for DeserializationError
source§impl From<Error> for DeserializationError
impl From<Error> for DeserializationError
source§fn from(source: IdParseError) -> Self
fn from(source: IdParseError) -> Self
Converts to this type from the input type.
source§impl From<HeaderDeserializationError> for DeserializationError
impl From<HeaderDeserializationError> for DeserializationError
source§fn from(source: HeaderDeserializationError) -> Self
fn from(source: HeaderDeserializationError) -> Self
Converts to this type from the input type.
source§impl From<Infallible> for DeserializationError
impl From<Infallible> for DeserializationError
source§fn from(err: Infallible) -> Self
fn from(err: Infallible) -> Self
Converts to this type from the input type.
source§impl From<MultipartMixedDeserializationError> for DeserializationError
impl From<MultipartMixedDeserializationError> for DeserializationError
source§fn from(source: MultipartMixedDeserializationError) -> Self
fn from(source: MultipartMixedDeserializationError) -> Self
Converts to this type from the input type.
source§impl From<ToStrError> for DeserializationError
impl From<ToStrError> for DeserializationError
source§fn from(err: ToStrError) -> Self
fn from(err: ToStrError) -> Self
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