Crate tokio_codec
source ·Expand description
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 crate::length_delimited::LengthDelimitedCodec;pub use crate::length_delimited::LengthDelimitedCodecError;
Modules§
- Frame a stream of bytes based on a length prefix
Structs§
- A simple
Codecimplementation that just ships bytes around. - A unified
StreamandSinkinterface to an underlying I/O object, using theEncoderandDecodertraits to encode and decode frames. FramedPartscontains an export of the data of a Framed transport. It can be used to construct a newFramedwith a different codec. It contains all current buffers and the inner transport.- A
Streamof messages decoded from anAsyncRead. - A
Sinkof frames encoded to anAsyncWrite. - A simple
Codecimplementation that splits up data into lines.
Enums§
- An error occured while encoding or decoding a line.
Traits§
- Decoding of frames via buffers.
- Trait of helper objects to write out messages as bytes, for use with
FramedWrite.