#macro-derive #async #ad-hoc #seen #default #async-drop #async-dropper

macro async-dropper-derive

The derive macro crate that supplies the implementation for AsyncDrop

12 unstable releases (3 breaking)

0.3.1 Oct 26, 2023
0.3.0 Oct 20, 2023
0.2.6 Oct 18, 2023
0.2.4 Aug 9, 2023
0.0.1 Jul 29, 2023

#6 in #seen

Download history 937/week @ 2024-07-21 1177/week @ 2024-07-28 985/week @ 2024-08-04 1236/week @ 2024-08-11 1096/week @ 2024-08-18 1295/week @ 2024-08-25 1346/week @ 2024-09-01 935/week @ 2024-09-08 596/week @ 2024-09-15 556/week @ 2024-09-22 560/week @ 2024-09-29 832/week @ 2024-10-06 613/week @ 2024-10-13 809/week @ 2024-10-20 722/week @ 2024-10-27 710/week @ 2024-11-03

2,919 downloads per month
Used in 7 crates (via async-dropper)

MIT license

15KB
227 lines

🗑 async-dropper-derive

async-dropper is probably the least-worst ad-hoc AsyncDrop implementation you've seen, and it works in two ways:

  • async_dropper::simple is stolen nearly verbatim from this StackOverflow answer (thanks to paholg!)
  • async_dropper::derive provides a trait called AsyncDrop and corresponding [derive macro][rust-derive-macro], which try to use Default and PartialEq to determine when to async drop.

The code in this crate powers async_dropper::derive. See the async_dropper crate for more details.

Dependencies

~0.2–10MB
~123K SLoC