3 unstable releases

0.2.1 Apr 17, 2022
0.2.0 Apr 17, 2022
0.1.0 Apr 16, 2022

#2948 in Rust patterns

MIT/Apache

7KB
71 lines

replace-drop

Allows you to add an atlernative drop function that can run instead of the normal one Useful in combination with an extension trait to add alternate drop functions to arbitary types


lib.rs:

ReplaceDrop replaces the drop of a type

It wraps ManuallyDrop and instead of not calling drop, it calls a secondary one This allows you to use other crates like ext to override the drop function of a type

No runtime deps