Skip to main content

Abs

Trait Abs 

Source
pub trait Abs {
    type Output: Num;

    // Required methods
    fn abs(&self) -> Self::Output;
    fn sign(&self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn abs(&self) -> Self::Output

Source

fn sign(&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 Abs for f32

Source§

type Output = f32

Source§

fn abs(&self) -> f32

Source§

fn sign(&self) -> f32

Source§

impl Abs for f64

Source§

type Output = f64

Source§

fn abs(&self) -> f64

Source§

fn sign(&self) -> f64

Source§

impl<'a> Abs for &'a f32

Source§

type Output = f32

Source§

fn abs(&self) -> f32

Source§

fn sign(&self) -> f32

Source§

impl<'a> Abs for &'a f64

Source§

type Output = f64

Source§

fn abs(&self) -> f64

Source§

fn sign(&self) -> f64

Implementors§