Trait Unary

Source
pub trait Unary<Operand> {
    type Output;

    // Required method
    fn op(operand: Operand) -> Self::Output;
}
Expand description

Trait that represents an unary operation on the operand of type Operand that returns the result of type Output.

See Async::unary_op.

Required Associated Types§

Source

type Output

The resulting type after applying the unary operation.

Required Methods§

Source

fn op(operand: Operand) -> Self::Output

Do the unary operation on the given operand.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Operand: Future> Unary<Operand> for Neg
where Operand::Output: Neg,

Source§

type Output = AsyncNeg<Operand>

Source§

impl<Operand: Future> Unary<Operand> for Not
where Operand::Output: Not,

Source§

type Output = AsyncNot<Operand>