Trait ContentType

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

A trait for types with an associated content type.

Required Associated Constantsยง

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ยง

ยง

impl ContentType for DeleteUrl

ยง

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

ยง

impl ContentType for GetUrl

ยง

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

ยง

impl ContentType for JsonEncoding

ยง

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

ยง

impl ContentType for PatchUrl

ยง

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

ยง

impl ContentType for PostUrl

ยง

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

ยง

impl ContentType for PutUrl

ยง

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

ยง

impl ContentType for Streaming

ยง

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

ยง

impl ContentType for StreamingText

ยง

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

ยง

impl ContentType for ServerFnErrorEncoding

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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