#linear #drop #resources #derive #dispose

macro dispose-derive

Derive macro for the dispose crate

6 releases (3 breaking)

0.4.0 Jul 31, 2023
0.3.0 Jul 3, 2021
0.2.0 Oct 20, 2020
0.1.2 Jun 21, 2020

#57 in #resource

Download history 17460/week @ 2024-06-25 21038/week @ 2024-07-02 1482/week @ 2024-07-09 1184/week @ 2024-07-16 1604/week @ 2024-07-23 1884/week @ 2024-07-30 1415/week @ 2024-08-06 2620/week @ 2024-08-13 3183/week @ 2024-08-20 1547/week @ 2024-08-27 2434/week @ 2024-09-03 2959/week @ 2024-09-10 2134/week @ 2024-09-17 1061/week @ 2024-09-24 1337/week @ 2024-10-01 2350/week @ 2024-10-08

7,259 downloads per month
Used in 7 crates (via dispose)

MIT/Apache

21KB
348 lines

dispose - Linear wrappers for Rust

This is a small crate I made when working with gfx-hal to simplify working with linear resources that must be consumed at the end of their life, rather than borrowed as Drop does. For more information, see the docs.


lib.rs:

Derive macro for the dispose crate.

This crate provides a derive macro for quickly deriving Dispose on types where the values can be consumed relatively trivially.

Dependencies

~300–750KB
~17K SLoC