Integer

Trait Integer 

Source
pub trait Integer<T>:
    Copy
    + From<u8>
    + PartialEq
    + PartialOrd
    + Add<Output = T>
    + BitAnd<Output = T>
    + BitOr<Output = T>
    + BitXor<Output = T>
    + Div<Output = T>
    + Mul<Output = T>
    + Rem<Output = T>
    + Shl<u32, Output = T>
    + Shr<u32, Output = T>
    + Sub<Output = T> {
    const ZERO: T;
    const ONE: T;
    const TEN: T;

    // Required method
    fn trailing_zeros(self) -> u32;
}

Required Associated Constants§

Source

const ZERO: T

Source

const ONE: T

Source

const TEN: T

Required Methods§

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<i16> for i16

Source§

const ZERO: i16 = 0

Source§

const ONE: i16 = 1

Source§

const TEN: i16 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<i32> for i32

Source§

const ZERO: i32 = 0

Source§

const ONE: i32 = 1

Source§

const TEN: i32 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<i64> for i64

Source§

const ZERO: i64 = 0

Source§

const ONE: i64 = 1

Source§

const TEN: i64 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<i128> for i128

Source§

const ZERO: i128 = 0

Source§

const ONE: i128 = 1

Source§

const TEN: i128 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<u8> for u8

Source§

const ZERO: u8 = 0

Source§

const ONE: u8 = 1

Source§

const TEN: u8 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<u16> for u16

Source§

const ZERO: u16 = 0

Source§

const ONE: u16 = 1

Source§

const TEN: u16 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<u32> for u32

Source§

const ZERO: u32 = 0

Source§

const ONE: u32 = 1

Source§

const TEN: u32 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<u64> for u64

Source§

const ZERO: u64 = 0

Source§

const ONE: u64 = 1

Source§

const TEN: u64 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<u128> for u128

Source§

const ZERO: u128 = 0

Source§

const ONE: u128 = 1

Source§

const TEN: u128 = 10

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<usize> for usize

Source§

const ZERO: usize = 0

Source§

const ONE: usize = 1

Source§

const TEN: usize = 10

Source§

fn trailing_zeros(self) -> u32

Implementors§