Trait hash_trie::traits::BitIndex[][src]

pub trait BitIndex {
    fn bit_index(&self, bit: Self) -> Result<usize, BitError>;
}
Expand description

BitIndex supports counting less significant 1s in the word (1s to the right of the bit).

Required methods

Count less significant 1s in the word (1s to the right of the bit) or return either BitError::CountNotEqualToOne or BitError::NotFound.

e.g. 0b110110.bit_index(0b100) == 1

Implementations on Foreign Types

Implementors