#[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