Function async_ops::assignable [−][src]
Expand description
Wraps the given Future
with Async
that can be used with the Assign
variants of std::ops
traits.
See also Async::assignable
.
Example
use futures::executor::block_on;
let a = async { 40 };
let b = async { 2 };
let result = async {
let mut a = async_ops::assignable(a);
a += b;
a.await
};
assert_eq!(42, block_on(result));