Skip to main content

Unity

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".

Implementations on Foreign Types§

Source§

impl Unity for f32

Source§

const ONE: Self = 1.0

Source§

const NEG_ONE: Self = -1.0

Source§

impl Unity for f64

Source§

const ONE: Self = 1.0

Source§

const NEG_ONE: Self = -1.0

Source§

impl Unity for i8

Source§

const ONE: Self = 1

Source§

const NEG_ONE: Self = -1

Source§

impl Unity for i16

Source§

const ONE: Self = 1

Source§

const NEG_ONE: Self = -1

Source§

impl Unity for i32

Source§

const ONE: Self = 1

Source§

const NEG_ONE: Self = -1

Source§

impl Unity for i64

Source§

const ONE: Self = 1

Source§

const NEG_ONE: Self = -1

Source§

impl Unity for i128

Source§

const ONE: Self = 1

Source§

const NEG_ONE: Self = -1

Source§

impl Unity for isize

Source§

const ONE: Self = 1

Source§

const NEG_ONE: Self = -1

Implementors§