pub trait EndpointError: OutgoingResponse + StdError + Sized + Send + 'static {
    fn try_from_http_response<T: AsRef<[u8]>>(
        response: Response<T>
    ) -> Result<Self, DeserializationError>; }
Available on crate feature api only.
Expand description

Gives users the ability to define their own serializable / deserializable errors.

Required Methods

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.

Implementors