Integer

Trait Integer 

Source
pub trait Integer:
    Sized
    + Copy
    + Clone
    + PartialEq
    + Eq
    + PartialOrd
    + Ord
    + Add<Output = Self>
    + AddAssign
    + Sub<Output = Self>
    + SubAssign
    + Mul<Output = Self>
    + MulAssign
    + Div<Output = Self>
    + DivAssign
    + Rem<Output = Self>
    + RemAssign
    + BitAnd<Output = Self>
    + BitAndAssign
    + BitOr<Output = Self>
    + BitOrAssign
    + BitXor<Output = Self>
    + BitXorAssign
    + Shl<u32, Output = Self>
    + ShlAssign<u32>
    + Shr<u32, Output = Self>
    + ShrAssign<u32>
    + Not {
    type Signedness;

    const BITS: u32;
}
Expand description

Describes core properties of integer types.

Required Associated Constants§

Source

const BITS: u32

Number of bits used for value representation.

Required Associated Types§

Source

type Signedness

Whether this type is Signed or Unsigned.

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

Source§

impl Integer for i16

Source§

impl Integer for i32

Source§

impl Integer for i64

Source§

impl Integer for i128

Source§

impl Integer for isize

Source§

impl Integer for u8

Source§

impl Integer for u16

Source§

impl Integer for u32

Source§

impl Integer for u64

Source§

impl Integer for u128

Source§

impl Integer for usize

Implementors§