reusable_box_future/lib.rs
1//! A reusable `Pin<Box<dyn Future<Output = T> + Send>>`.
2//!
3//! This lets you replace the future stored in the box without reallocating
4//! when the size and alignment permits it.
5//!
6//! This code was extracted from [tokio-util] crate.
7//!
8//! [tokio-util]: https://docs.rs/tokio-util
9
10#![cfg_attr(not(test), no_std)]
11extern crate alloc;
12
13mod box_future;
14mod local_box_future;
15
16pub use crate::box_future::ReusableBoxFuture;
17pub use crate::local_box_future::ReusableLocalBoxFuture;