Trait NegativeOne

Source
pub trait NegativeOne {
    const NEGATIVE_ONE: Self;
}
Expand description

Provides the constant -1.

Required Associated Constants§

Source

const NEGATIVE_ONE: Self

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 NegativeOne for f32

The constant -1.0 for primitive floating-point types.

Source§

const NEGATIVE_ONE: f32 = -1f32

Source§

impl NegativeOne for f64

The constant -1.0 for primitive floating-point types.

Source§

const NEGATIVE_ONE: f64 = -1f64

Source§

impl NegativeOne for i8

The constant -1.

§Examples

See here.

Source§

const NEGATIVE_ONE: i8 = -1i8

Source§

impl NegativeOne for i16

The constant -1.

§Examples

See here.

Source§

const NEGATIVE_ONE: i16 = -1i16

Source§

impl NegativeOne for i32

The constant -1.

§Examples

See here.

Source§

const NEGATIVE_ONE: i32 = -1i32

Source§

impl NegativeOne for i64

The constant -1.

§Examples

See here.

Source§

const NEGATIVE_ONE: i64 = -1i64

Source§

impl NegativeOne for i128

The constant -1.

§Examples

See here.

Source§

const NEGATIVE_ONE: i128 = -1i128

Source§

impl NegativeOne for isize

The constant -1.

§Examples

See here.

Source§

const NEGATIVE_ONE: isize = -1isize

Source§

impl NegativeOne for NonZeroI8

Source§

impl NegativeOne for NonZeroI16

Source§

impl NegativeOne for NonZeroI32

Source§

impl NegativeOne for NonZeroI64

Source§

impl NegativeOne for NonZeroI128

Source§

impl NegativeOne for NonZeroIsize

Implementors§