Struct httpcodec::HeadBodyEncoder [] [src]

pub struct HeadBodyEncoder<E>(_);

A body encoder mainly intended to be used for encoding HEAD responses.

HeadBodyDecoder updates HTTP header ordinally but discards all data produced by the inner encoder.

Methods

impl<E: BodyEncode> HeadBodyEncoder<E>
[src]

[src]

Makes a new HeadBodyEncoder instance.

[src]

Returns a reference to a inner body encoder.

[src]

Returns a mutable reference to a inner body encoder.

[src]

Takes ownership of HeadBodyEncoder and returns the inner body encoder.

Trait Implementations

impl<E: Debug> Debug for HeadBodyEncoder<E>
[src]

[src]

Formats the value using the given formatter. Read more

impl<E: Default> Default for HeadBodyEncoder<E>
[src]

[src]

Returns the "default value" for a type. Read more

impl<E: BodyEncode> Encode for HeadBodyEncoder<E>
[src]

The type of items to be encoded.

[src]

Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more

[src]

Tries to start encoding the given item. Read more

[src]

Returns true if there are no items to be encoded in the encoder, otherwise false. Read more

[src]

Returns the number of bytes required to encode all the items in the encoder. Read more

impl<E: BodyEncode> SizedEncode for HeadBodyEncoder<E>
[src]

[src]

Returns the exact number of bytes required to encode all the items remaining in the encoder.

impl<E: BodyEncode> BodyEncode for HeadBodyEncoder<E>
[src]

[src]

This method is called before starting to encode a HTTP body. Read more

Auto Trait Implementations

impl<E> Send for HeadBodyEncoder<E> where
    E: Send

impl<E> Sync for HeadBodyEncoder<E> where
    E: Sync