Function neg

Source
pub fn neg<Operand: Neg>(
    operand: impl Future<Output = Operand>,
) -> impl Future<Output = Operand::Output>
Expand description

Returns a Future that will resolve the given Future and neg its result.

ยงExample

use futures_executor::block_on;
use async_ops::neg;

let a = async { 42 };

let result = async {
  neg(a).await
};

assert_eq!(std::ops::Neg::neg(42), block_on(result));