#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

#63 in #resource

Download history 1155/week @ 2023-12-14 1840/week @ 2023-12-21 1805/week @ 2023-12-28 503/week @ 2024-01-04 880/week @ 2024-01-11 1311/week @ 2024-01-18 1630/week @ 2024-01-25 1947/week @ 2024-02-01 2897/week @ 2024-02-08 5411/week @ 2024-02-15 2618/week @ 2024-02-22 4071/week @ 2024-02-29 3791/week @ 2024-03-07 3405/week @ 2024-03-14 3098/week @ 2024-03-21 3129/week @ 2024-03-28

15,187 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