Trait CheckedAbs

Source
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.

Source§

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.

Source§

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.

Source§

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.

Source§

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.

Source§

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.

Source§

type Output = isize

Implementors§