#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

#64 in #resource

Download history 1983/week @ 2024-08-26 1891/week @ 2024-09-02 3136/week @ 2024-09-09 2027/week @ 2024-09-16 1400/week @ 2024-09-23 1206/week @ 2024-09-30 2142/week @ 2024-10-07 2449/week @ 2024-10-14 5266/week @ 2024-10-21 4308/week @ 2024-10-28 7771/week @ 2024-11-04 6668/week @ 2024-11-11 5221/week @ 2024-11-18 3682/week @ 2024-11-25 2569/week @ 2024-12-02 3069/week @ 2024-12-09

15,440 downloads per month
Used in 7 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

~245–690KB
~17K SLoC