Function abortable_parser::combinators::optional
source · Expand description
Maps a Result
to be optional.
Result::Fail
maps to None and Result::Complete
maps to Some. The rest of the
Result
variants are left untouched. You must pass in the iterator that the
next matcher should use in the event of a fail.
The optional!
macro provides some syntactice sugar for using this combinator
properly.