pub trait CheckedAbs {
    type Output;

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

Takes the absolute valie of a number, returning None if the result is not representable.

Required Associated Types§

Required Methods§

source

fn checked_abs(self) -> Option<Self::Output>

Implementations on Foreign Types§

source§

impl CheckedAbs for i8

source§

fn checked_abs(self) -> Option<i8>

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

§

type Output = i8

source§

impl CheckedAbs for i16

source§

fn checked_abs(self) -> Option<i16>

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

§

type Output = i16

source§

impl CheckedAbs for i32

source§

fn checked_abs(self) -> Option<i32>

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

§

type Output = i32

source§

impl CheckedAbs for i64

source§

fn checked_abs(self) -> Option<i64>

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

§

type Output = i64

source§

impl CheckedAbs for i128

source§

fn checked_abs(self) -> Option<i128>

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

§

type Output = i128

source§

impl CheckedAbs for isize

source§

fn checked_abs(self) -> Option<isize>

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

§

type Output = isize

Implementors§