Trait poem_openapi::payload::Payload[][src]

pub trait Payload: Sized {
    const CONTENT_TYPE: &'static str;

    fn schema_ref() -> MetaSchemaRef;
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 register(registry: &mut Registry) { ... } }
Expand description

Represents a payload type.

Associated Constants

The content type of this payload.

Required methods

Gets schema reference of this payload.

Parse the payload object from the HTTP request.

Provided methods

Register the schema contained in this payload to the registry.

Implementations on Foreign Types

Implementors