#linear #drop #resources #derive #dispose

macro dispose-derive

Derive macro for the dispose crate

8 releases

0.4.2 Nov 21, 2024
0.4.1 Nov 21, 2024
0.4.0 Jul 31, 2023
0.3.0 Jul 3, 2021
0.1.2 Jun 21, 2020

#68 in #resource

Download history 7302/week @ 2024-11-06 6075/week @ 2024-11-13 4865/week @ 2024-11-20 3155/week @ 2024-11-27 2817/week @ 2024-12-04 4057/week @ 2024-12-11 4410/week @ 2024-12-18 1716/week @ 2024-12-25 2131/week @ 2025-01-01 2608/week @ 2025-01-08 2494/week @ 2025-01-15 2556/week @ 2025-01-22 4528/week @ 2025-01-29 7117/week @ 2025-02-05 4610/week @ 2025-02-12

17,078 downloads per month
Used in 8 crates (via dispose)

MIT/Apache

22KB
373 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

~215–650KB
~16K SLoC