Skip to main content

Int

Trait Int 

Source
pub trait Int:
    Sized
    + Clone
    + Copy
    + Debug
    + Shr<u32, Output = Self>
    + Shl<u32, Output = Self>
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + PartialEq
    + CastInto<i16> {
    const ZERO: Self;
    const ONE: Self;
}
🔬This is a nightly-only experimental API. (num_internals)
Expand description

Collection of traits that allow us to be generic over integer size.

Required Associated Constants§

Source

const ZERO: Self

🔬This is a nightly-only experimental API. (num_internals)
Source

const ONE: Self

🔬This is a nightly-only experimental API. (num_internals)

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§

Source§

impl Int for u16

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Int for u32

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

impl Int for u64

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1