Trait ruma::api::EndpointError
source · [−]pub trait EndpointError: 'static + OutgoingResponse + Error + Send {
fn try_from_http_response<T>(
response: Response<T>
) -> Result<Self, DeserializationError>
where
T: AsRef<[u8]>;
}Expand description
Gives users the ability to define their own serializable / deserializable errors.
Required Methods
fn try_from_http_response<T>(
response: Response<T>
) -> Result<Self, DeserializationError> where
T: AsRef<[u8]>,
fn try_from_http_response<T>(
response: Response<T>
) -> Result<Self, DeserializationError> where
T: AsRef<[u8]>,
Tries to construct Self from an http::Response.
This will always return Err variant when no error field is defined in
the ruma_api macro.
