You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fn seems to be the most straight-forward to implement to me. I think FnOnce could be modeled as above with an r-value ref-qualified call operator that would "null" out its internals after the call. Subsequent calls of rust::FnOnce could then throw an exception similar to std::bad_function_call (https://en.cppreference.com/w/cpp/utility/functional/function/operator()).
I suspect FnMut has some safety issues I'm unaware of. In standard Rust types, we have to Pin the mutable self reference.
Building atop #52, we should be able to support passing
Fn
,FnMut
,FnOnce
from rust into C++.The text was updated successfully, but these errors were encountered: