Uint

Trait Uint 

Source
pub trait Uint:
    Copy
    + Eq
    + Add<Output = Self>
    + Sub<Output = Self>
    + Sized
    + BitAndAssign
    + TryInto<usize> {
    const BITS: usize;
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn trailing_zeros(self) -> Self;
}
Expand description

Internal helper trait for BitsIter.

Required Associated Constants§

Source

const BITS: usize

Number of bits of that type.

Source

const ZERO: Self

0 value of the underlying primitive type.

Source

const ONE: Self

1 value of the underlying primitive type.

Required Methods§

Source

fn trailing_zeros(self) -> Self

Number of trailing zeroes.

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 Uint for u8

Source§

const BITS: usize = 8usize

Source§

const ZERO: Self = 0u8

Source§

const ONE: Self = 1u8

Source§

fn trailing_zeros(self) -> Self

Source§

impl Uint for u16

Source§

const BITS: usize = 16usize

Source§

const ZERO: Self = 0u16

Source§

const ONE: Self = 1u16

Source§

fn trailing_zeros(self) -> Self

Source§

impl Uint for u32

Source§

const BITS: usize = 32usize

Source§

const ZERO: Self = 0u32

Source§

const ONE: Self = 1u32

Source§

fn trailing_zeros(self) -> Self

Source§

impl Uint for u64

Source§

const BITS: usize = 64usize

Source§

const ZERO: Self = 0u64

Source§

const ONE: Self = 1u64

Source§

fn trailing_zeros(self) -> Self

Source§

impl Uint for u128

Source§

const BITS: usize = 128usize

Source§

const ZERO: Self = 0u128

Source§

const ONE: Self = 1u128

Source§

fn trailing_zeros(self) -> Self

Source§

impl Uint for usize

Source§

const BITS: usize = 64usize

Source§

const ZERO: Self = 0usize

Source§

const ONE: Self = 1usize

Source§

fn trailing_zeros(self) -> Self

Implementors§