pub fn neg<Operand: Neg>( operand: impl Future<Output = Operand>, ) -> impl Future<Output = Operand::Output>
Returns a Future that will resolve the given Future and neg its result.
Future
neg
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));