[][src]Trait ruma_api::IncomingRequest

pub trait IncomingRequest: Sized {
    type EndpointError: EndpointError;
    type OutgoingResponse: TryInto<Response<Vec<u8>>, Error = IntoHttpError>;

    pub const METADATA: Metadata;

    pub fn try_from_http_request(
        req: Request<Vec<u8>>
    ) -> Result<Self, FromHttpRequestError>; }

A request type for a Matrix API endpoint. (trait 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: TryInto<Response<Vec<u8>>, Error = IntoHttpError>[src]

Response type to return when the request is successful.

Loading content...

Associated Constants

pub const METADATA: Metadata[src]

Metadata about the endpoint.

Loading content...

Required methods

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

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

Loading content...

Implementors

Loading content...