pub trait SaturatingNeg {
    type Output;

    // Required method
    fn saturating_neg(self) -> Self::Output;
}
Expand description

Negates a number, saturating at the numeric bounds instead of overflowing.

Required Associated Types§

Required Methods§

source

fn saturating_neg(self) -> Self::Output

Implementations on Foreign Types§

source§

impl SaturatingNeg for i8

source§

fn saturating_neg(self) -> i8

This is a wrapper over the saturating_neg functions in the standard library, for example this one.

§

type Output = i8

source§

impl SaturatingNeg for i16

source§

fn saturating_neg(self) -> i16

This is a wrapper over the saturating_neg functions in the standard library, for example this one.

§

type Output = i16

source§

impl SaturatingNeg for i32

source§

fn saturating_neg(self) -> i32

This is a wrapper over the saturating_neg functions in the standard library, for example this one.

§

type Output = i32

source§

impl SaturatingNeg for i64

source§

fn saturating_neg(self) -> i64

This is a wrapper over the saturating_neg functions in the standard library, for example this one.

§

type Output = i64

source§

impl SaturatingNeg for i128

source§

fn saturating_neg(self) -> i128

This is a wrapper over the saturating_neg functions in the standard library, for example this one.

§

type Output = i128

source§

impl SaturatingNeg for isize

source§

fn saturating_neg(self) -> isize

This is a wrapper over the saturating_neg functions in the standard library, for example this one.

§

type Output = isize

Implementors§