Enum ruma::api::error::DeserializationError
source · #[non_exhaustive]pub enum DeserializationError {
Utf8(Utf8Error),
Json(Error),
Query(Error),
Ident(Error),
Header(HeaderDeserializationError),
MultipartMixed(MultipartMixedDeserializationError),
}
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