Trait SaturatingAbs

Source
pub trait SaturatingAbs {
    type Output;

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

Takes the absolute value of a number, saturating at the numeric bounds instead of overflowing.

Required Associated Types§

Required Methods§

Source

fn saturating_abs(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl SaturatingAbs for i8

Source§

fn saturating_abs(self) -> i8

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

Source§

type Output = i8

Source§

impl SaturatingAbs for i16

Source§

fn saturating_abs(self) -> i16

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

Source§

type Output = i16

Source§

impl SaturatingAbs for i32

Source§

fn saturating_abs(self) -> i32

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

Source§

type Output = i32

Source§

impl SaturatingAbs for i64

Source§

fn saturating_abs(self) -> i64

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

Source§

type Output = i64

Source§

impl SaturatingAbs for i128

Source§

fn saturating_abs(self) -> i128

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

Source§

type Output = i128

Source§

impl SaturatingAbs for isize

Source§

fn saturating_abs(self) -> isize

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

Source§

type Output = isize

Implementors§