Module u8

Module u8 

Source
Available on crate feature bigendian only.
Expand description

BigEndianBitString functions for specific integer type

Constants§

ELEMENT_BITS
bits in a single element

Functions§

element_contains
check whether another bit string other shares the first prefix bits with value
element_flip
Flips the ndxth bit.
element_get
Get the ndxth bit.
element_inc
increment from right; don’t touch first prefix bits; returns true on overflow
element_is_false_from
Whether all bits from [ndx..] are false (0).
element_is_true_from
Whether all bits from [ndx..] are true (1).
element_set
Set the ndxth bit to bit.
element_set_false_from
Set all bits from [ndx..] to false (0).
element_set_true_from
Set all bits from [ndx..] to true (1).
element_shared_prefix_len
Length of the longest shared prefix of two bit strings.
make_element_flip
Flips the ndxth bit.
make_element_inc
increment from right; don’t touch first prefix bits; returns true on overflow
make_element_set
Set the ndxth bit to bit.
make_element_set_false_from
Set all bits from [ndx..] to false (0).
make_element_set_true_from
Set all bits from [ndx..] to true (1).
mask
integer with single bit set. bit 0 is the highest bit (big endian). Wraps at ELEMENT_BITS.
slice_contains
check whether another bit string other shares the first prefix bits with slice
slice_flip
Flips the ndxth bit.
slice_get
Get the ndxth bit.
slice_inc
increment from right; don’t touch first prefix bits; returns true on overflow
slice_is_false_from
Whether all bits from [ndx..] are false (0).
slice_is_true_from
Whether all bits from [ndx..] are true (1).
slice_set
Set the ndxth bit to bit.
slice_set_false_from
Set all bits from [ndx..] to false (0).
slice_set_true_from
Set all bits from [ndx..] to true (1).
slice_shared_prefix_len
Length of the longest shared prefix of two bit strings.