2020-12-28 03:24:43 +00:00
|
|
|
//! Codec utilities for working with framed protocols.
|
2018-10-05 13:07:09 -07:00
|
|
|
//!
|
|
|
|
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and
|
|
|
|
//! [`AsyncWrite`], to framed streams implementing [`Sink`] and [`Stream`].
|
2020-06-03 01:05:39 +08:00
|
|
|
//! Framed streams are also known as `transports`.
|
2018-10-05 13:07:09 -07:00
|
|
|
//!
|
2020-06-03 01:05:39 +08:00
|
|
|
//! [`Sink`]: futures_sink::Sink
|
|
|
|
//! [`Stream`]: futures_core::Stream
|
2020-08-18 23:27:37 +01:00
|
|
|
|
2021-04-16 02:06:11 +01:00
|
|
|
#![deny(rust_2018_idioms, nonstandard_style, future_incompatible)]
|
2020-08-18 23:27:37 +01:00
|
|
|
#![warn(missing_docs)]
|
2020-12-12 23:24:00 +00:00
|
|
|
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
|
|
|
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
2018-10-05 13:07:09 -07:00
|
|
|
|
2018-10-24 10:43:30 -07:00
|
|
|
mod bcodec;
|
2018-10-05 13:07:09 -07:00
|
|
|
mod framed;
|
2021-11-05 00:12:02 +00:00
|
|
|
mod lines;
|
2018-10-05 13:07:09 -07:00
|
|
|
|
2018-10-24 10:43:30 -07:00
|
|
|
pub use self::bcodec::BytesCodec;
|
2018-10-05 13:07:09 -07:00
|
|
|
pub use self::framed::{Framed, FramedParts};
|
2021-11-05 00:12:02 +00:00
|
|
|
pub use self::lines::LinesCodec;
|
2018-12-09 15:19:25 -08:00
|
|
|
|
2020-12-28 11:16:37 +08:00
|
|
|
pub use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
2019-12-05 13:11:56 +06:00
|
|
|
pub use tokio_util::codec::{Decoder, Encoder};
|
2020-12-28 11:16:37 +08:00
|
|
|
pub use tokio_util::io::poll_read_buf;
|