Function memchr::memmem::searcher::searcher_kind_one_byte
source · unsafe fn searcher_kind_one_byte(
searcher: &Searcher,
_prestate: &mut PrefilterState,
haystack: &[u8],
_needle: &[u8],
) -> Option<usize>
Expand description
Reads from the one_byte
field of SearcherKind
to handle the case of
searching for a single byte needle. Works on all platforms.
§Safety
Callers must ensure that the searcher.kind.one_byte
union field is set.