Skip to main content

Abs

Trait Abs 

Source
pub trait Abs {
    type Output;

    // Required method
    fn abs(self) -> Self::Output;

    // Provided method
    fn _apply(self) -> Self::Output
       where Self: Sized { ... }
}
Expand description

trait to represent the operation

Required Associated Types§

Source

type Output

the output type

Required Methods§

Source

fn abs(self) -> Self::Output

computes the operation

Provided Methods§

Source

fn _apply(self) -> Self::Output
where Self: Sized,

macro convenience version of the primary method

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) -> Self::Output

Implementors§

Source§

impl<B: Backend> Abs for Value<B>