Expand description
Utilities for encoding and decoding frames.
Note: This crate is deprecated in tokio 0.2.x and has been moved into
tokio_util::codecof thetokio-utilcrate behind thecodecfeature flag.
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.
Structs§
- Bytes
Codec - A simple
Codecimplementation that just ships bytes around. - Framed
- A unified
StreamandSinkinterface to an underlying I/O object, using theEncoderandDecodertraits to encode and decode frames. - Framed
Parts 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.- Framed
Read - A
Streamof messages decoded from anAsyncRead. - Framed
Write - A
Sinkof frames encoded to anAsyncWrite. - Lines
Codec - A simple
Codecimplementation that splits up data into lines.