bparse

Function not

Source
pub fn not<P: Pattern>(pattern: P) -> NegativeLookahead<P>
Expand description

Returns a new pattern that matches only if pattern does not match

The new pattern alwasy returns Some(0) if it matches (i.e. if the underlying pattern did not match). Think of this as a negative “peek” operation (aka “Negative Lookahead”).