Trait hash_trie::traits::NthBit[][src]

pub trait NthBit {
    fn nth_bit(n: usize) -> Result<Self, BitError>
    where
        Self: Sized
; }
Expand description

NthBit provides a word with only the nth bit set to 1.

Required methods

Get the nth bit of the given word size.

e.g. u32::nth_bit(4) == 0b10000

Implementations on Foreign Types

Implementors