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§
sourceconst IS_REQUIRED: bool
const IS_REQUIRED: bool
If it is true
, it means that this payload is required.
Required Methods§
sourcefn from_request(
request: &Request,
body: &mut RequestBody
) -> impl Future<Output = Result<Self>> + Send
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.