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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.