Skip to main content

NegativeOne

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§

impl NegativeOne for f64

The constant -1.0 for primitive floating-point types.

Source§

impl NegativeOne for i8

The constant -1.

§Examples

See here.

Source§

impl NegativeOne for i16

The constant -1.

§Examples

See here.

Source§

impl NegativeOne for i32

The constant -1.

§Examples

See here.

Source§

impl NegativeOne for i64

The constant -1.

§Examples

See here.

Source§

impl NegativeOne for i128

The constant -1.

§Examples

See here.

Source§

impl NegativeOne for isize

The constant -1.

§Examples

See here.

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§