pub trait MinInt:
    Copy
    + Debug
    + BitOr<Output = Self>
    + Not<Output = Self>
    + Shl<u32, Output = Self> {
    type OtherSign: MinInt;
    type Unsigned: MinInt;

    const SIGNED: bool;
    const BITS: u32;
    const ZERO: Self;
    const ONE: Self;
    const MIN: Self;
    const MAX: Self;
}
Expand description

Minimal integer implementations needed on all integer types, including wide integers.

Required Associated Constants§

Source

const SIGNED: bool

If Self is a signed integer

Source

const BITS: u32

The bitwidth of the int type

Source

const ZERO: Self

Source

const ONE: Self

Source

const MIN: Self

Source

const MAX: Self

Required Associated Types§

Source

type OtherSign: MinInt

Type with the same width but other signedness

Source

type Unsigned: MinInt

Unsigned version of 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.

Implementors§