Trait ruma::api::IncomingRequest [−][src]
pub trait IncomingRequest {
type EndpointError: EndpointError;
type OutgoingResponse: OutgoingResponse;
const METADATA: Metadata;
fn try_from_http_request<T>(
req: Request<T>
) -> Result<Self, FromHttpRequestError>
where
T: AsRef<[u8]>;
}
This is supported on crate feature
api
only.Expand description
A request type for a Matrix API endpoint, used for receiving requests.
Associated Types
A type capturing the error conditions that can be returned in the response.
Response type to return when the request is successful.
Associated Constants
Required methods
fn try_from_http_request<T>(
req: Request<T>
) -> Result<Self, FromHttpRequestError> where
T: AsRef<[u8]>,
fn try_from_http_request<T>(
req: Request<T>
) -> Result<Self, FromHttpRequestError> where
T: AsRef<[u8]>,
Tries to turn the given http::Request
into this request type.