Expand description
A deep nibble (4-bit integer) library.
U4 is the actual nibble type, and offers common integer operations.
U4x2 packs two U4s in a u8, useful for building your own primitives.
AsNibbles allows you to view e.g [u8] as a slice of U4s.
Stack is Heap-optimised stack of U4 which uses a packed
representation to half the memory usage of the equivalent Vec<U4>, but
with a less powerful API.
Re-exports§
pub use stack::Stack;alloc
Modules§
- stack
alloc - Heap-optimised stack of
U4which uses a packed representation to store twoU4s per heap-allocated byte.
Macros§
Structs§
- AsNibbles
- A wrapper around an
AsRef<[u8]>which interprets the underlying bytes as a sequence ofU4. - Into
Iter - Iterator of
U4s in anAsNibbles. - Iter
- Returned by
AsNibbles::iter. - U4x2
- Packed representation of two
U4s in a single byte.
Enums§
- U4
- A 4-bit unsigned integer, which can store numbers
0..16.