#wrap #function #proc-macro #nested #decorator

func_wrap

Helper crate for procedural macro authors that wish to duplicate some received function inside its body, so as to be able to wrap with some prologue, epilogue, cache-ing, etc

5 releases

0.1.3 Nov 23, 2020
0.1.2 Oct 28, 2020
0.1.1 Oct 28, 2020
0.1.0 Oct 27, 2020

#12 in #decorator

Download history 646/week @ 2024-12-26 8931/week @ 2025-01-02 13200/week @ 2025-01-09 12510/week @ 2025-01-16 13074/week @ 2025-01-23 15912/week @ 2025-01-30 18821/week @ 2025-02-06 12292/week @ 2025-02-13 10262/week @ 2025-02-20 10483/week @ 2025-02-27 11265/week @ 2025-03-06 15876/week @ 2025-03-13 14971/week @ 2025-03-20 14514/week @ 2025-03-27 13843/week @ 2025-04-03 11268/week @ 2025-04-10

56,887 downloads per month
Used in 4 crates (2 directly)

Zlib OR MIT OR Apache-2.0

22KB
513 lines

::func_wrap

Repository Latest version Documentation MSRV License CI

Helper crate for procedural macro authors that wish to duplicate some received function inside its body, so as to be able to wrap with some prologue, epilogue, cache-ing, etc.

Examples

See http://docs.rs/require_unsafe_in_body for a real-life example of using it.

Dependencies

~1.5MB
~38K SLoC