Function exact_width

Source
pub fn exact_width<Then>(width: usize, then: Then) -> ExactWidth<Then>
Expand description

Creates a runtime scanner that forces exactly width bytes to be consumed.

This is done in two steps: first, it truncates the input provided to the inner scanner to exactly width bytes. Secondly, it verifies that the inner scanner consumed all of the truncated input.

See: exact_width_a.