2020-12-28 03:24:43 +00:00
|
|
|
//! Codec utilities for working with framed protocols.
|
2018-10-05 13:07:09 -07:00
|
|
|
//!
|
2022-10-30 20:25:10 +00:00
|
|
|
//! 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`.
|
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-12-08 06:09:46 +00:00
|
|
|
#![deny(rust_2018_idioms, nonstandard_style)]
|
|
|
|
#![warn(future_incompatible, 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
|
|
|
|
2023-07-17 03:05:39 +01:00
|
|
|
pub use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
|
|
|
pub use tokio_util::{
|
|
|
|
codec::{Decoder, Encoder},
|
|
|
|
io::poll_read_buf,
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2023-07-17 03:05:39 +01:00
|
|
|
pub use self::{
|
|
|
|
bcodec::BytesCodec,
|
|
|
|
framed::{Framed, FramedParts},
|
|
|
|
lines::LinesCodec,
|
|
|
|
};
|