pub trait BitTest {
    fn bits(&self) -> usize;
    fn bit(&self, position: usize) -> bool;
    fn trailing_zeros(&self) -> usize;
}
Expand description

This trait support unified bit testing for (unsigned) integers

Required Methods

Get the minimum required number of bits to represent this integer

Get the i-th bit of the integer, with i specified by position

Get the number of trailing zeros in the integer

Implementations on Foreign Types

Implementors