#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

#7 in #seen

Download history 749/week @ 2024-03-13 662/week @ 2024-03-20 890/week @ 2024-03-27 504/week @ 2024-04-03 517/week @ 2024-04-10 478/week @ 2024-04-17 317/week @ 2024-04-24 368/week @ 2024-05-01 365/week @ 2024-05-08 589/week @ 2024-05-15 374/week @ 2024-05-22 665/week @ 2024-05-29 490/week @ 2024-06-05 761/week @ 2024-06-12 667/week @ 2024-06-19 951/week @ 2024-06-26

3,100 downloads per month
Used in 5 crates (via async-dropper)

MIT license

14KB
192 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.3–11MB
~120K SLoC