Trait poem_openapi::Request [−][src]
pub trait Request: Sized {
fn meta() -> MetaRequest;
fn register(registry: &mut Registry);
fn from_request<'life0, 'life1, 'async_trait>(
request: &'life0 Request,
body: &'life1 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self, ParseRequestError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
Represents a OpenAPI request object.
Reference: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#requestBodyObject
Required methods
Register the schema contained in this request object to the registry.
fn from_request<'life0, 'life1, 'async_trait>(
request: &'life0 Request,
body: &'life1 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self, ParseRequestError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'life1, 'async_trait>(
request: &'life0 Request,
body: &'life1 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self, ParseRequestError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Parse the request object from the HTTP request.