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§
Sourcefn find_in(&self, haystack: &[u8], span: Span) -> Candidate
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>
impl<P: PrefilterI + ?Sized> PrefilterI for Arc<P>
Implementors§
impl PrefilterI for Memmem
Available on crate features
std and perf-literal only.impl PrefilterI for Packed
impl PrefilterI for RareBytesOne
Available on crate feature
perf-literal only.impl PrefilterI for RareBytesThree
Available on crate feature
perf-literal only.impl PrefilterI for RareBytesTwo
Available on crate feature
perf-literal only.impl PrefilterI for StartBytesOne
Available on crate feature
perf-literal only.impl PrefilterI for StartBytesThree
Available on crate feature
perf-literal only.impl PrefilterI for StartBytesTwo
Available on crate feature
perf-literal only.