PrefilterI

Trait 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§

Source§

impl PrefilterI for Memmem

Available on crate features std and perf-literal only.
Source§

impl PrefilterI for Packed

Source§

impl PrefilterI for RareBytesOne

Available on crate feature perf-literal only.
Source§

impl PrefilterI for RareBytesThree

Available on crate feature perf-literal only.
Source§

impl PrefilterI for RareBytesTwo

Available on crate feature perf-literal only.
Source§

impl PrefilterI for StartBytesOne

Available on crate feature perf-literal only.
Source§

impl PrefilterI for StartBytesThree

Available on crate feature perf-literal only.
Source§

impl PrefilterI for StartBytesTwo

Available on crate feature perf-literal only.