Function length_data
fn length_data<I, E, F>(f: F) -> impl Parser<I, Output = I, Error = E>
where
I: Input,
<F as Parser<I>>::Output: ToUsize,
F: Parser<I, Error = E>,
E: ParseError<I>
Gets a number from the parser and returns a
subslice of the input of that size.
If the parser returns Incomplete,
length_data will return an error.
Arguments
fThe parser to apply.
# use ;
use be_u16;
use length_data;
use tag;
assert_eq!;
assert_eq!;