#box #future #async #reuse #no-std

no-std reusable-box-future

A reusable Pin<Box<dyn Future<Output = T> + Send>>

2 unstable releases

0.2.0 Feb 27, 2021
0.1.0 Feb 20, 2021

#601 in Asynchronous

Download history 369/week @ 2023-12-18 341/week @ 2023-12-25 214/week @ 2024-01-01 282/week @ 2024-01-08 225/week @ 2024-01-15 2490/week @ 2024-01-22 3656/week @ 2024-01-29 4347/week @ 2024-02-05 3205/week @ 2024-02-12 2661/week @ 2024-02-19 2932/week @ 2024-02-26 2658/week @ 2024-03-04 2726/week @ 2024-03-11 2759/week @ 2024-03-18 3616/week @ 2024-03-25 2769/week @ 2024-04-01

11,927 downloads per month
Used in 18 crates (3 directly)

MIT license

20KB
354 lines

reusable-box-future

license crates.io docs

A reusable Pin<Box<dyn Future<Output = T> + Send>>.

This lets you replace the future stored in the box without reallocating when the size and alignment permits it.

This code was extracted from tokio-util crate.

License

MIT


lib.rs:

A reusable Pin<Box<dyn Future<Output = T> + Send>>.

This lets you replace the future stored in the box without reallocating when the size and alignment permits it.

This code was extracted from tokio-util crate.

No runtime deps