[NativeRustLibrary] support std::promise
Summary:
Context in ENG-6384
I tried to implement it using the template (std::promise<T>) but this complicates the code. I think we can assume the caller will handle it properly.
Test Plan:
- Test both rejecting/resolving
- I used one of existing methods and added sleep in Rust code to wait long enough and make sure it works
Reviewers: marcin, michal, varun
Reviewed By: varun
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10613