Open whatisaphone opened 5 years ago
That's correct.
The Function
trait cannot express lifetime semantics of individual arguments and has therefore a 'static
requirement (so functions with reference arguments do not implement it).
An alternative is to use the more cumbersome RawDetour
.
Perhaps there is a potentially better alternative implementation but I've yet to identify a solution that is type-safe.
I understand. That's an unfortunate limitation. Thanks for the explanation and workaround 👍
Something goes wrong deep in the innards of the macro when you try to detour an extern "Rust" function that takes a reference as a parameter: