#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

#64 in #resource

Download history 668/week @ 2023-11-26 854/week @ 2023-12-03 1193/week @ 2023-12-10 1304/week @ 2023-12-17 1647/week @ 2023-12-24 1541/week @ 2023-12-31 599/week @ 2024-01-07 1029/week @ 2024-01-14 1341/week @ 2024-01-21 2327/week @ 2024-01-28 1764/week @ 2024-02-04 3723/week @ 2024-02-11 5034/week @ 2024-02-18 2219/week @ 2024-02-25 4469/week @ 2024-03-03 1375/week @ 2024-03-10

13,223 downloads per month
Used in 6 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

~0.4–0.8MB
~19K SLoC