aoc::util::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<Output = T>
    + Shr<Output = T>
    + Sub<Output = T> {
    const ZERO: T;
    const ONE: T;
    const TEN: T;

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

Required Associated Constants§

Source

const ZERO: T

Source

const ONE: T

Source

const TEN: T

Required Methods§

Source

fn trailing_zeros(self) -> T

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 = 0i16

Source§

const ONE: i16 = 1i16

Source§

const TEN: i16 = 10i16

Source§

fn trailing_zeros(self) -> i16

Source§

impl Integer<i32> for i32

Source§

const ZERO: i32 = 0i32

Source§

const ONE: i32 = 1i32

Source§

const TEN: i32 = 10i32

Source§

fn trailing_zeros(self) -> i32

Source§

impl Integer<i64> for i64

Source§

const ZERO: i64 = 0i64

Source§

const ONE: i64 = 1i64

Source§

const TEN: i64 = 10i64

Source§

fn trailing_zeros(self) -> i64

Source§

impl Integer<i128> for i128

Source§

const ZERO: i128 = 0i128

Source§

const ONE: i128 = 1i128

Source§

const TEN: i128 = 10i128

Source§

fn trailing_zeros(self) -> i128

Source§

impl Integer<u8> for u8

Source§

const ZERO: u8 = 0u8

Source§

const ONE: u8 = 1u8

Source§

const TEN: u8 = 10u8

Source§

fn trailing_zeros(self) -> u8

Source§

impl Integer<u16> for u16

Source§

const ZERO: u16 = 0u16

Source§

const ONE: u16 = 1u16

Source§

const TEN: u16 = 10u16

Source§

fn trailing_zeros(self) -> u16

Source§

impl Integer<u32> for u32

Source§

const ZERO: u32 = 0u32

Source§

const ONE: u32 = 1u32

Source§

const TEN: u32 = 10u32

Source§

fn trailing_zeros(self) -> u32

Source§

impl Integer<u64> for u64

Source§

const ZERO: u64 = 0u64

Source§

const ONE: u64 = 1u64

Source§

const TEN: u64 = 10u64

Source§

fn trailing_zeros(self) -> u64

Source§

impl Integer<u128> for u128

Source§

const ZERO: u128 = 0u128

Source§

const ONE: u128 = 1u128

Source§

const TEN: u128 = 10u128

Source§

fn trailing_zeros(self) -> u128

Source§

impl Integer<usize> for usize

Source§

const ZERO: usize = 0usize

Source§

const ONE: usize = 1usize

Source§

const TEN: usize = 10usize

Source§

fn trailing_zeros(self) -> usize

Implementors§