pub fn assert<'a, O>(
combinator: impl Fn(&'a str) -> ParseResult<'a, O>,
condition: impl Fn(Result<&(&'a str, O), &ParseError<'a>>) -> bool,
message: &'static str,
) -> impl Fn(&'a str) -> ParseResult<'a, O>Expand description
Asserts that a given condition is true about the combinator. Otherwise returns an error with the message.