Trait ruma_api::IncomingResponse [−][src]
pub trait IncomingResponse: Sized { type EndpointError: EndpointError; 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.
Associated Types
type EndpointError: EndpointError
[src]
Expand description
A type capturing the expected error conditions the server can return.
Required methods
fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>
) -> Result<Self, FromHttpResponseError<Self::EndpointError>>
[src]
response: Response<T>
) -> Result<Self, FromHttpResponseError<Self::EndpointError>>
Expand description
Tries to convert the given http::Response
into this response type.