#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

#60 in #resource

Download history 906/week @ 2024-01-10 1373/week @ 2024-01-17 1238/week @ 2024-01-24 2155/week @ 2024-01-31 2798/week @ 2024-02-07 4833/week @ 2024-02-14 3543/week @ 2024-02-21 2480/week @ 2024-02-28 4754/week @ 2024-03-06 3668/week @ 2024-03-13 2752/week @ 2024-03-20 3771/week @ 2024-03-27 5929/week @ 2024-04-03 9694/week @ 2024-04-10 5456/week @ 2024-04-17 4015/week @ 2024-04-24

25,925 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

~325–780KB
~18K SLoC