Trait ruma_common::api::OutgoingResponse
source · [−]pub trait OutgoingResponse {
fn try_into_http_response<T: Default + BufMut>(
self
) -> Result<Response<T>, IntoHttpError>;
}
Expand description
A request type for a Matrix API endpoint, used for sending responses.
Required Methods
fn try_into_http_response<T: Default + BufMut>(
self
) -> Result<Response<T>, IntoHttpError>
fn try_into_http_response<T: Default + BufMut>(
self
) -> Result<Response<T>, IntoHttpError>
Tries to convert this response into an http::Response
.
This method should only fail when when invalid header values are specified. It may also fail with a serialization error in case of bugs in Ruma though.