Skip to main content

SignedInt

Trait SignedInt 

Source
pub trait SignedInt: Int + Neg<Output = Self> {
    const NEG_ONE: Self;
}
Expand description

Generic trait for the built-in Rust signed integer types.

Unlike traits provided by crates like num_traits, it is sealed.

See Int for design decisions around this trait.

Required Associated Constants§

Source

const NEG_ONE: Self

The negative value of 1.

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 SignedInt for i8

Source§

const NEG_ONE: Self = -1

Source§

impl SignedInt for i16

Source§

const NEG_ONE: Self = -1

Source§

impl SignedInt for i32

Source§

const NEG_ONE: Self = -1

Source§

impl SignedInt for i64

Source§

const NEG_ONE: Self = -1

Source§

impl SignedInt for i128

Source§

const NEG_ONE: Self = -1

Source§

impl SignedInt for isize

Source§

const NEG_ONE: Self = -1

Implementors§