Trait aho_corasick::util::prefilter::PrefilterI

source ·
trait PrefilterI:
    Send
    + Sync
    + RefUnwindSafe
    + UnwindSafe
    + Debug
    + 'static {
    // Required method
    fn find_in(&self, haystack: &[u8], span: Span) -> Candidate;
}
Expand description

A prefilter describes the behavior of fast literal scanners for quickly skipping past bytes in the haystack that we know cannot possibly participate in a match.

Required Methods§

source

fn find_in(&self, haystack: &[u8], span: Span) -> Candidate

Returns the next possible match candidate. This may yield false positives, so callers must confirm a match starting at the position returned. This, however, must never produce false negatives. That is, this must, at minimum, return the starting position of the next match in the given haystack after or at the given position.

Implementations on Foreign Types§

source§

impl<P: PrefilterI + ?Sized> PrefilterI for Arc<P>

source§

fn find_in(&self, haystack: &[u8], span: Span) -> Candidate

Implementors§