#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 132/week @ 2023-12-18 160/week @ 2023-12-25 459/week @ 2024-01-01 728/week @ 2024-01-08 748/week @ 2024-01-15 477/week @ 2024-01-22 617/week @ 2024-01-29 343/week @ 2024-02-05 572/week @ 2024-02-12 524/week @ 2024-02-19 608/week @ 2024-02-26 404/week @ 2024-03-04 590/week @ 2024-03-11 715/week @ 2024-03-18 785/week @ 2024-03-25 697/week @ 2024-04-01

2,821 downloads per month
Used in 3 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–14MB
~144K SLoC