Function async_ops::not[][src]

pub fn not<Operand: Not>(
    operand: impl Future<Output = Operand>
) -> impl Future<Output = Operand::Output>
Expand description

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

Example

use futures::executor::block_on;
use async_ops::not;

let a = async { 42 };

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

assert_eq!(std::ops::Not::not(42), block_on(result));