Struct async_ops::Sub [−][src]
pub struct Sub;
Expand description
A Binary
operation that will concurrently resolve two Futures
and sub
their results.
Example
use futures::executor::block_on;
use async_ops::Sub;
let a = async { 42 };
let b = async { 2 };
let result = async {
async_ops::on(a).op(Sub, b).await
};
assert_eq!(std::ops::Sub::sub(42, 2), block_on(result));
Trait Implementations
type Output = AsyncSub<Lhs, Rhs>
type Output = AsyncSub<Lhs, Rhs>
The resulting type after applying the binary operation.