Trait UnsignedAbs

Source
pub trait UnsignedAbs: Signed {
    type Unsigned;

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

Convert signed value to unsigned.

Required Associated Types§

Source

type Unsigned

Unsigned type.

Required Methods§

Source

fn unsigned_abs(&self) -> Self::Unsigned

Computes the absolute value and returns as a unsigned value.

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 UnsignedAbs for i64

Source§

impl UnsignedAbs for i128

Implementors§