from_parser_fn

Function from_parser_fn 

Source
pub fn from_parser_fn<'i, O, F>(f: F) -> FromFn<F>
where F: Fn(&'i [u8], &mut ParseState<'i>, &mut bool, bool) -> ParserResult<'i, O>,
Expand description

Parser which delegates to the provided function/closure.

This wrapper exists to avoid conflicting implementations of the Parser trait, which would occur if both Leaf and Parser were implemented for the Fn trait family.