Trait Abs

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

Helper trait for computing absolute values of generic types.

Required Methods§

Source

fn abs(self) -> Self

Compute the absolute value of this type. No-op if the value is alread positive.

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 i64

Source§

fn abs(self) -> Self

Implementors§

Source§

impl<C> Abs for GridIndex<C>