Skip to main content

ContentTypeMarker

Trait ContentTypeMarker 

Source
pub trait ContentTypeMarker:
    Send
    + Sync
    + 'static {
    const CONTENT_TYPE: &'static str;
}
Expand description

A content type marker.

Required Associated Constants§

Source

const CONTENT_TYPE: &'static str

The expected Content-Type header value.

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.

Implementors§

Source§

impl ContentTypeMarker for FormContent

Source§

const CONTENT_TYPE: &'static str = "application/x-www-form-urlencoded"

Source§

impl ContentTypeMarker for JsonContent

Source§

const CONTENT_TYPE: &'static str = "application/json"