Trait ruma_common::api::IncomingResponse
source · pub trait IncomingResponse: Sized {
type EndpointError: EndpointError;
// Required method
fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>,
) -> Result<Self, FromHttpResponseError<Self::EndpointError>>;
}
Expand description
A response type for a Matrix API endpoint, used for receiving responses.
Required Associated Types§
sourcetype EndpointError: EndpointError
type EndpointError: EndpointError
A type capturing the expected error conditions the server can return.
Required Methods§
sourcefn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>,
) -> Result<Self, FromHttpResponseError<Self::EndpointError>>
fn try_from_http_response<T: AsRef<[u8]>>( response: Response<T>, ) -> Result<Self, FromHttpResponseError<Self::EndpointError>>
Tries to convert the given http::Response
into this response type.
Object Safety§
This trait is not object safe.