Module bits

Module bits 

Source
Expand description

The bitwise utils.

Traits§

Unsigned
An unsigned trait that used by the utils.

Functions§

align_down
Align down the given value with the given align.
align_up
Align up the given value with the given align.
assert_aligned
Assert that the given value is aligned with the given align.
assert_pow2
Assert that the given value is a power of 2.
debug_assert_aligned
Debug assert that the given value is aligned with the given align.
debug_assert_pow2
Debug assert that the given value is a power of 2.
is_aligned
Check if the given value is aligned with the given align.
is_pow2
Check if the given value is a power of 2.