Trait OrdAbs

Source
pub trait OrdAbs: Eq + PartialOrdAbs<Self> {
    // Required method
    fn cmp_abs(&self, other: &Self) -> Ordering;
}
Expand description

Compares the absolute values of two numbers.

Required Methods§

Source

fn cmp_abs(&self, other: &Self) -> Ordering

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 OrdAbs for i8

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for i16

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for i32

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for i64

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for i128

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for isize

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for u8

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

For unsigned values, this is the same as ordinary comparison.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for u16

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

For unsigned values, this is the same as ordinary comparison.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for u32

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

For unsigned values, this is the same as ordinary comparison.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for u64

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

For unsigned values, this is the same as ordinary comparison.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for u128

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

For unsigned values, this is the same as ordinary comparison.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl OrdAbs for usize

Source§

fn cmp_abs(&self, other: &Self) -> Ordering

Compares the absolute values of two numbers, taking both by reference.

For unsigned values, this is the same as ordinary comparison.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§