Trait poem_openapi::payload::Payload
source · pub trait Payload: Send {
const CONTENT_TYPE: &'static str;
// Required method
fn schema_ref() -> MetaSchemaRef;
// Provided methods
fn check_content_type(content_type: &str) -> bool { ... }
fn register(registry: &mut Registry) { ... }
}
Expand description
Represents a payload type.
Required Associated Constants§
sourceconst CONTENT_TYPE: &'static str
const CONTENT_TYPE: &'static str
The content type of this payload.
Required Methods§
sourcefn schema_ref() -> MetaSchemaRef
fn schema_ref() -> MetaSchemaRef
Gets schema reference of this payload.
Provided Methods§
sourcefn check_content_type(content_type: &str) -> bool
fn check_content_type(content_type: &str) -> bool
Check the content type of incoming request