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

pub trait Payload: IntoResponse + Sized {
    const CONTENT_TYPE: &'static str;
    const SCHEMA_REF: MetaSchemaRef;

    fn from_request<'life0, 'life1, 'async_trait>(
        request: &'life0 Request,
        body: &'life1 mut RequestBody
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + 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.

The schema ref of this payload.

Required methods

Parse the payload object from the HTTP request.

Provided methods

Register the schema contained in this payload to the registry.

Implementors