12 releases
| 0.2.6 | Jan 31, 2024 |
|---|---|
| 0.2.5 | Oct 20, 2023 |
| 0.2.3 | Aug 9, 2023 |
| 0.1.4 | Jul 30, 2023 |
#200 in Asynchronous
123,581 downloads per month
Used in 16 crates
(3 directly)
28KB
552 lines
🗑 async-dropper-simple
async-dropper is probably the least-worst ad-hoc AsyncDrop implementation you've seen, and it works in two ways:
async_dropper::simpleis stolen nearly verbatim from this StackOverflow answer (thanks topaholg!)async_dropper::deriveprovides a trait calledAsyncDropand corresponding [derive macro][rust-derive-macro], which try to useDefaultandPartialEqto determine when to async drop.
The code in this crate powers async_dropper::simple. See the async_dropper crate for more details.
Feature flags
| Flag | Description |
|---|---|
tokio |
Use the [tokio][tokio] async runtime |
async-std |
use the [async-std][async-std] async runtime |
no-default-bound |
Avoid the Default bound on your T by wrapping the interior data in an Option<T> |
Dependencies
~0.7–7MB
~146K SLoC