Trait Abs

Source
pub trait Abs {
    // Required method
    fn abs(self) -> Self;
}
Expand description

Defines the absolute value for a type.

Required Methods§

Source

fn abs(self) -> Self

Returns the absolute value of this type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Abs for f32

Source§

fn abs(self) -> Self

Source§

impl Abs for f64

Source§

fn abs(self) -> Self

Source§

impl Abs for i8

Source§

fn abs(self) -> i8

Source§

impl Abs for i16

Source§

fn abs(self) -> i16

Source§

impl Abs for i32

Source§

fn abs(self) -> i32

Source§

impl Abs for i64

Source§

fn abs(self) -> i64

Source§

impl Abs for i128

Source§

fn abs(self) -> i128

Source§

impl Abs for isize

Source§

fn abs(self) -> isize

Source§

impl Abs for u8

Source§

fn abs(self) -> u8

Source§

impl Abs for u16

Source§

fn abs(self) -> u16

Source§

impl Abs for u32

Source§

fn abs(self) -> u32

Source§

impl Abs for u64

Source§

fn abs(self) -> u64

Source§

impl Abs for u128

Source§

fn abs(self) -> u128

Source§

impl Abs for usize

Source§

fn abs(self) -> usize

Implementors§