pub trait IncomingRequest: Metadata {
type EndpointError: EndpointError;
type OutgoingResponse: OutgoingResponse;
// Required method
fn try_from_http_request_inner(
request: Request<&[u8]>,
path_args: &[&str],
) -> Result<Self, DeserializationError>;
}Available on crate feature
api only.Expand description
A request type for a Matrix API endpoint, used for receiving requests.
Required Associated Types§
Sourcetype EndpointError: EndpointError
type EndpointError: EndpointError
A type capturing the error conditions that can be returned in the response.
Sourcetype OutgoingResponse: OutgoingResponse
type OutgoingResponse: OutgoingResponse
Response type to return when the request is successful.
Required Methods§
Sourcefn try_from_http_request_inner(
request: Request<&[u8]>,
path_args: &[&str],
) -> Result<Self, DeserializationError>
fn try_from_http_request_inner( request: Request<&[u8]>, path_args: &[&str], ) -> Result<Self, DeserializationError>
Tries to turn the given http::Request into this request type,
together with the corresponding path arguments.
Note: The strings in path_args need to be percent-decoded.
This function should not check the method of the HTTP request, this check is performed
in IncomingRequestExt::try_from_http_request().
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".