Trait ContentType

Source
pub trait ContentType {
    const CONTENT_TYPE: &'static str;
}
Expand description

A trait for types with an associated content type.

Required Associated Constants§

Source

const CONTENT_TYPE: &'static str

The MIME type of the data.

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 ContentType for DeleteUrl

Source§

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

Source§

impl ContentType for GetUrl

Source§

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

Source§

impl ContentType for JsonEncoding

Source§

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

Source§

impl ContentType for PatchUrl

Source§

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

Source§

impl ContentType for PostUrl

Source§

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

Source§

impl ContentType for PutUrl

Source§

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

Source§

impl ContentType for Streaming

Source§

const CONTENT_TYPE: &'static str = "application/octet-stream"

Source§

impl ContentType for StreamingText

Source§

const CONTENT_TYPE: &'static str = "text/plain"

Source§

impl ContentType for ServerFnErrorEncoding

Source§

const CONTENT_TYPE: &'static str = "text/plain"

Source§

impl<Codec> ContentType for Patch<Codec>
where Codec: ContentType,

Source§

const CONTENT_TYPE: &'static str = Codec::CONTENT_TYPE

Source§

impl<Codec> ContentType for Post<Codec>
where Codec: ContentType,

Source§

const CONTENT_TYPE: &'static str = Codec::CONTENT_TYPE

Source§

impl<Codec> ContentType for Put<Codec>
where Codec: ContentType,

Source§

const CONTENT_TYPE: &'static str = Codec::CONTENT_TYPE