Function memchr::memmem::searcher::searcher_kind_two_way

source ·
unsafe fn searcher_kind_two_way(
    searcher: &Searcher,
    _prestate: &mut PrefilterState,
    haystack: &[u8],
    needle: &[u8],
) -> Option<usize>
Expand description

Reads from the two_way field of SearcherKind to handle the case of searching for an arbitrary needle without prefilter acceleration. Works on all platforms.

§Safety

Callers must ensure that the searcher.kind.two_way union field is set.