Trait Encoding

pub trait Encoding: ContentType {
    const METHOD: Method;
}
Expand description

Defines a particular encoding format, which can be used for serializing or deserializing data.

Required Associated Constantsยง

const METHOD: Method

The HTTP method used for requests.

This should be POST in most cases.

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

ยง

const METHOD: Method = Method::DELETE

ยง

impl Encoding for GetUrl

ยง

const METHOD: Method = Method::GET

ยง

impl Encoding for PatchUrl

ยง

const METHOD: Method = Method::PATCH

ยง

impl Encoding for PostUrl

ยง

const METHOD: Method = Method::POST

ยง

impl Encoding for PutUrl

ยง

const METHOD: Method = Method::PUT

ยง

impl Encoding for Streaming

ยง

const METHOD: Method = Method::POST

ยง

impl Encoding for StreamingText

ยง

const METHOD: Method = Method::POST

ยง

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

ยง

const METHOD: Method = http::Method::PATCH

ยง

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

ยง

const METHOD: Method = http::Method::POST

ยง

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

ยง

const METHOD: Method = http::Method::PUT