Moved from #114 (comment). @jerel
|
The workaround for now is to pass context through manually via an opaque Rust type.
Is there any way today to repeatedly call the callback from C++ with the same context? The example given works great for a oneshot:
void some_async(
rust::Fn<void(rust::Box<Context> ctx, double ret)> done,
rust::Box<Context> ctx) const
{
done(std::move(ctx), 42.0);
}
but I'm unclear if it's possible today to accomplish this:
done(std::move(ctx), 42.0);
done(std::move(ctx), 42.1);
| |