Module combinator
General purpose combinators
Structs
- AllConsuming Parser implementation for [all_consuming]
- Cond Parser implementation for [cond]
- Consumed Parser implementation for [consumed]
- Cut Parser implementation for [cut]
- Fail Parser implementation for [fail]
- MakeComplete Parser implementation for [complete]
- Not Parser implementation for [not]
- Opt Parser implementation for [opt]
- ParserIterator Main structure associated to the [iterator] function.
- Peek Parsr implementation for [peek]
- Recognize Parser implementation for [recognize]
- Success Parser implementation for [success]
- Verify Parser iplementation for verify
Functions
- all_consuming Succeeds if all the input has been consumed by its child parser.
-
complete
Transforms Incomplete into
Error. - cond Calls the parser if the condition is met.
- consumed if the child parser was successful, return the consumed input with the output as a tuple. Functions similarly to recognize except it returns the parser output as well.
-
cut
Transforms an
Err::Error(recoverable) toErr::Failure(unrecoverable) - eof returns its input if it is at the end of input data
- fail A parser which always fails.
- flat_map Creates a new parser from the output of the first parser, then apply that parser over the rest of the input.
- into automatically converts the child parser's result to another type
- iterator Creates an iterator from input data and a parser.
- map Maps a function on the result of a parser.
-
map_opt
Applies a function returning an
Optionover the result of a parser. - map_parser Applies a parser over the result of another one.
-
map_res
Applies a function returning a
Resultover the result of a parser. - not Succeeds if the child parser returns an error.
-
opt
Optional parser, will return
NoneonErr::Error. - peek Tries to apply its parser without consuming the input.
- recognize If the child parser was successful, return the consumed input as produced value.
- rest Return the remaining input.
- rest_len Return the length of the remaining input.
- success a parser which always succeeds with given value without consuming any input.
- value Returns the provided value if the child parser succeeds.
- verify Returns the result of the child parser if it satisfies a verification function.