Crate bitfrob

source ·
Expand description

A crate to help with bit manipulation of integers.

Features

  • track_caller adds the #[track_caller] attribute on all the functions that assert stuff.

Structs

  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Iterator for groups of bits in an integer (low to high).
  • Two u8 values packed as a u16.

Constants

  • When used as a multiplier, scales a “1 bit” u8 to spread the value across all 8 bits.
  • When used as a multiplier, scales a “2 bit” u8 to spread the value across all 8 bits.
  • When used as a multiplier, scales a “4 bit” u8 to spread the value across all 8 bits.

Functions