Trait ruma_common::api::EndpointError

source ·
pub trait EndpointError: OutgoingResponse + StdError + Sized + Send + 'static {
    // Required method
    fn from_http_response<T: AsRef<[u8]>>(response: Response<T>) -> Self;
}
Available on crate feature api only.
Expand description

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

Required Methods§

source

fn from_http_response<T: AsRef<[u8]>>(response: Response<T>) -> Self

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.

Object Safety§

This trait is not object safe.

Implementors§