Struct async_ops::Neg[][src]

pub struct Neg;
Expand description

A Unary operation that will concurrently resolve a Future and neg its result.

Example

use futures::executor::block_on;
use async_ops::Neg;

let a = async { 42 };

let result = async {
  async_ops::on(a).unary_op(Neg).await
};

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

Trait Implementations

The resulting type after applying the unary operation.

Do the unary operation on the given operand.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.