Trait ruma::api::EndpointError[][src]

pub trait EndpointError: 'static + OutgoingResponse + Error + Send {
    fn try_from_http_response<T>(
        response: Response<T>
    ) -> Result<Self, ResponseDeserializationError>
    where
        T: AsRef<[u8]>
; }
This is supported 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