Trait Neg

Source
pub trait Neg {
    type Output;

    // Required method
    fn neg(self) -> Self::Output;
}

Required Associated Types§

Source

type Output

The resulting type after applying the - operator.

Required Methods§

Source

fn neg(self) -> Self::Output

Performs the unary - operation.

§Example
let x: i32 = 12;
assert_eq!(-x, -12);

Implementations on Foreign Types§

Source§

impl Neg for &&Value

Source§

type Output = Value

Source§

fn neg(self) -> Self::Output

Source§

impl Neg for &Value

Source§

type Output = Value

Source§

fn neg(self) -> Self::Output

Source§

impl Neg for &mut Value

Source§

type Output = Value

Source§

fn neg(self) -> Self::Output

Source§

impl Neg for Value

Source§

type Output = Value

Source§

fn neg(self) -> Self::Output

Implementors§