pub fn build_forward_with_ranker<
        'n,
        R: HeuristicFrequencyRank,
        B: ?Sized + AsRef<[u8]>,
    >(
        &self,
        ranker: R,
        needle: &'n B,
    ) -> Finder<'n> {
        let needle = needle.as_ref();
        Finder {
            needle: CowBytes::new(needle),
            searcher: Searcher::new(self.prefilter, ranker, needle),
        }
    }
Build a forward finder using the given needle and a custom heuristic for
determining the frequency of a given byte in the dataset.
See [`HeuristicFrequencyRank`] for more details.
src/memmem/mod.rs