pub trait BitHelpers {
    type Item;

    // Required methods
    fn get_lsb(&self) -> Self::Item;
    fn pop_lsb(&self) -> Self::Item;
    fn bit_count(&self) -> usize;
    fn bit_scan(&self) -> usize;
}

Required Associated Types§

Required Methods§

source

fn get_lsb(&self) -> Self::Item

source

fn pop_lsb(&self) -> Self::Item

source

fn bit_count(&self) -> usize

source

fn bit_scan(&self) -> usize

Implementations on Foreign Types§

source§

impl BitHelpers for i8

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = i8

source§

impl BitHelpers for i16

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = i16

source§

impl BitHelpers for i32

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = i32

source§

impl BitHelpers for i64

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = i64

source§

impl BitHelpers for isize

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = isize

source§

impl BitHelpers for u8

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = u8

source§

impl BitHelpers for u16

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = u16

source§

impl BitHelpers for u32

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = u32

source§

impl BitHelpers for u64

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = u64

source§

impl BitHelpers for usize

source§

fn get_lsb(&self) -> Self::Item

Extracts the lowest set isolated bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsi

source§

fn pop_lsb(&self) -> Self::Item

Resets the lowest set bit.

More about asm instruction: https://www.felixcloutier.com/x86/blsr

source§

fn bit_count(&self) -> usize

Counts the number of set bits.

More about asm instruction: https://www.felixcloutier.com/x86/popcnt

source§

fn bit_scan(&self) -> usize

Gets an index of the first set bit by counting trailing zero bits.

More about asm instruction: https://www.felixcloutier.com/x86/tzcnt

§

type Item = usize

Implementors§