| 1 |
//! Codec utilities for working with framed protocols. |
| 2 |
//! |
| 3 |
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and [`AsyncWrite`], to framed |
| 4 |
//! streams implementing [`Sink`] and [`Stream`]. Framed streams are also known as `transports`. |
| 5 |
//! |
| 6 |
//! [`Sink`]: futures_sink::Sink |
| 7 |
//! [`Stream`]: futures_core::Stream |
| 8 |
|
| 9 |
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] |
| 10 |
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] |
| 11 |
|
| 12 |
pub use tokio::io::{AsyncRead, AsyncWrite, ReadBuf}; |
| 13 |
pub use tokio_util::{ |
| 14 |
codec::{Decoder, Encoder}, |
| 15 |
io::poll_read_buf, |
| 16 |
}; |
| 17 |
|
| 18 |
mod bcodec; |
| 19 |
mod framed; |
| 20 |
mod lines; |
| 21 |
|
| 22 |
pub use self::{ |
| 23 |
bcodec::BytesCodec, |
| 24 |
framed::{Framed, FramedParts}, |
| 25 |
lines::LinesCodec, |
| 26 |
}; |