[][src]Module tokio_util::codec

This is supported on feature="codec" only.

Utilities for encoding and decoding frames.

Contains adapters to go from streams of bytes, AsyncRead and AsyncWrite, to framed streams implementing Sink and Stream. Framed streams are also known as transports.

Re-exports

pub use self::length_delimited::LengthDelimitedCodec;
pub use self::length_delimited::LengthDelimitedCodecError;

Modules

length_delimitedfeature="codec"

Frame a stream of bytes based on a length prefix

Structs

BytesCodecfeature="codec"

A simple Codec implementation that just ships bytes around.

Framedfeature="codec"

A unified Stream and Sink interface to an underlying I/O object, using the Encoder and Decoder traits to encode and decode frames.

FramedPartsfeature="codec"

FramedParts contains an export of the data of a Framed transport. It can be used to construct a new Framed with a different codec. It contains all current buffers and the inner transport.

FramedReadfeature="codec"

A Stream of messages decoded from an AsyncRead.

FramedWritefeature="codec"

A Sink of frames encoded to an AsyncWrite.

LinesCodecfeature="codec"

A simple Codec implementation that splits up data into lines.

Enums

LinesCodecErrorfeature="codec"

An error occured while encoding or decoding a line.

Traits

Decoderfeature="codec"

Decoding of frames via buffers.

Encoderfeature="codec"

Trait of helper objects to write out messages as bytes, for use with FramedWrite.