[][src]Module rusticata_macros::combinator

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

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 applies parser.

flat_takec

Take len bytes from input, and apply parser.

pure

Create a combinator that returns the provided value, and input unchanged