Trait Unity

Source
pub trait Unity {
    const ONE: Self;
    const NEG_ONE: Self;
}
Expand description

A type that has positive and negative unit values.

Required Associated Constants§

Source

const ONE: Self

The unit value.

Source

const NEG_ONE: Self

The negative unit 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 Unity for f32

Source§

const ONE: Self = 1f32

Source§

const NEG_ONE: Self = -1f32

Source§

impl Unity for f64

Source§

const ONE: Self = 1f64

Source§

const NEG_ONE: Self = -1f64

Source§

impl Unity for i8

Source§

const ONE: Self = 1i8

Source§

const NEG_ONE: Self = -1i8

Source§

impl Unity for i16

Source§

const ONE: Self = 1i16

Source§

const NEG_ONE: Self = -1i16

Source§

impl Unity for i32

Source§

const ONE: Self = 1i32

Source§

const NEG_ONE: Self = -1i32

Source§

impl Unity for i64

Source§

const ONE: Self = 1i64

Source§

const NEG_ONE: Self = -1i64

Source§

impl Unity for i128

Source§

const ONE: Self = 1i128

Source§

const NEG_ONE: Self = -1i128

Source§

impl Unity for isize

Source§

const ONE: Self = 1isize

Source§

const NEG_ONE: Self = -1isize

Implementors§