Expand description
Module containing zero-copy parsers.
These parsers require the RangeStream
bound instead of a plain Stream
.
Structs§
Enums§
Functions§
- length_
prefix - Takes a parser which parses a
length
then extracts a range of that length and returns it. Commonly used in binary formats - range
- Zero-copy parser which reads a range of length
i.len()
and succeeds ifi
is equal to that range. - recognize
- Zero-copy parser which returns committed input range.
- recognize_
with_ value - Zero-copy parser which returns a pair: (committed input range, parsed value).
- take
- Zero-copy parser which reads a range of length
n
. - take_fn
- Searches the entire range using
searcher
and then consumes a range ofSome(n)
. Iff
can not find anything in the range it must returnNone/NotFound
which indicates an end of input error. - take_
until_ range - Zero-copy parser which reads a range of 0 or more tokens until
r
is found. - take_
while - Zero-copy parser which reads a range of 0 or more tokens which satisfy
f
. - take_
while1 - Zero-copy parser which reads a range of 1 or more tokens which satisfy
f
.