Trait poem_openapi::payload::ParsePayload

source ·
pub trait ParsePayload: Sized {
    const IS_REQUIRED: bool;

    // Required method
    fn from_request(
        request: &Request,
        body: &mut RequestBody
    ) -> impl Future<Output = Result<Self>> + Send;
}
Expand description

Represents a payload that can parse from HTTP request.

Required Associated Constants§

source

const IS_REQUIRED: bool

If it is true, it means that this payload is required.

Required Methods§

source

fn from_request( request: &Request, body: &mut RequestBody ) -> impl Future<Output = Result<Self>> + Send

Parse the payload object from the HTTP request.

Object Safety§

This trait is not object safe.

Implementors§