Skip to main content

UnsignedAbs

Trait UnsignedAbs 

Source
pub trait UnsignedAbs {
    type Output;

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

Takes the absolute value of a number and converts to the unsigned equivalent.

Required Associated Types§

Required Methods§

Source

fn unsigned_abs(self) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl UnsignedAbs for i8

Source§

fn unsigned_abs(self) -> u8

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

Source§

type Output = u8

Source§

impl UnsignedAbs for i16

Source§

fn unsigned_abs(self) -> u16

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

Source§

type Output = u16

Source§

impl UnsignedAbs for i32

Source§

fn unsigned_abs(self) -> u32

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

Source§

type Output = u32

Source§

impl UnsignedAbs for i64

Source§

fn unsigned_abs(self) -> u64

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

Source§

type Output = u64

Source§

impl UnsignedAbs for i128

Source§

fn unsigned_abs(self) -> u128

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

Source§

type Output = u128

Source§

impl UnsignedAbs for isize

Source§

fn unsigned_abs(self) -> usize

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

Source§

type Output = usize

Implementors§