Trait ruma_api::IncomingRequest[][src]

pub trait IncomingRequest: Sized {
    type EndpointError: EndpointError;
    type OutgoingResponse: OutgoingResponse;

    const METADATA: Metadata;

    fn try_from_http_request<T: AsRef<[u8]>>(
        req: Request<T>
    ) -> Result<Self, FromHttpRequestError>; }

A request type for a Matrix API endpoint, used for receiving requests.

Associated Types

type EndpointError: EndpointError[src]

A type capturing the error conditions that can be returned in the response.

type OutgoingResponse: OutgoingResponse[src]

Response type to return when the request is successful.

Loading content...

Associated Constants

const METADATA: Metadata[src]

Metadata about the endpoint.

Loading content...

Required methods

fn try_from_http_request<T: AsRef<[u8]>>(
    req: Request<T>
) -> Result<Self, FromHttpRequestError>
[src]

Tries to turn the given http::Request into this request type.

Loading content...

Implementors

Loading content...