1//! Helpers for IO related tasks.
2//!
3//! The stream types are often used in combination with hyper or reqwest, as they
4//! allow converting between a hyper [`Body`] and [`AsyncRead`].
5//!
6//! The [`SyncIoBridge`] type converts from the world of async I/O
7//! to synchronous I/O; this may often come up when using synchronous APIs
8//! inside [`tokio::task::spawn_blocking`].
9//!
10//! [`Body`]: https://docs.rs/hyper/0.13/hyper/struct.Body.html
11//! [`AsyncRead`]: tokio::io::AsyncRead
12
13mod read_buf;
14mod reader_stream;
15mod stream_reader;
16cfg_io_util! {
17 mod sync_bridge;
18 pub use self::sync_bridge::SyncIoBridge;
19}
20
21pub use self::read_buf::read_buf;
22pub use self::reader_stream::ReaderStream;
23pub use self::stream_reader::StreamReader;
24pub use crate::util::{poll_read_buf, poll_write_buf};
25