Expand description
General purpose combinators
Functionsยง
- align32
- Align input value to the next multiple of 4 bytes
- align_
n2 - Align input value to the next multiple of n bytes Valid only if n is a power of 2
- be_
var_ u64 - Read the entire slice as a big endian unsigned integer, up to 8 bytes
- bytes_
to_ u64 Deprecated - Read an entire slice as a big-endian value.
- cond_
else - Helper macro for nom parsers: run first parser if condition is true, else second parser
- flat_
take - Return a closure that takes
len
bytes from input, and appliesparser
. - flat_
takec - Take
len
bytes frominput
, and applyparser
. - le_
var_ u64 - Read the entire slice as a little endian unsigned integer, up to 8 bytes
- parse_
hex_ to_ u64 - Read a slice as a big-endian value.
- pure
- Create a combinator that returns the provided value, and input unchanged
- upgrade_
error - Apply combinator, automatically converts between errors if the underlying type supports it