Trait kernel::num::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 Types§

source

type Signedness

Whether this type is Signed or Unsigned.

Required Associated Constants§

source

const BITS: u32

Number of bits used for value representation.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Integer for i8

§

type Signedness = Signed

source§

const BITS: u32 = 8u32

source§

impl Integer for i16

§

type Signedness = Signed

source§

const BITS: u32 = 16u32

source§

impl Integer for i32

§

type Signedness = Signed

source§

const BITS: u32 = 32u32

source§

impl Integer for i64

§

type Signedness = Signed

source§

const BITS: u32 = 64u32

source§

impl Integer for i128

§

type Signedness = Signed

source§

const BITS: u32 = 128u32

source§

impl Integer for isize

§

type Signedness = Signed

source§

const BITS: u32 = 64u32

source§

impl Integer for u8

source§

impl Integer for u16

§

type Signedness = Unsigned

source§

const BITS: u32 = 16u32

source§

impl Integer for u32

§

type Signedness = Unsigned

source§

const BITS: u32 = 32u32

source§

impl Integer for u64

§

type Signedness = Unsigned

source§

const BITS: u32 = 64u32

source§

impl Integer for u128

§

type Signedness = Unsigned

source§

const BITS: u32 = 128u32

source§

impl Integer for usize

§

type Signedness = Unsigned

source§

const BITS: u32 = 64u32

Implementors§