Struct FinderBuilder
pub struct FinderBuilder { /* private fields */ }
A builder for constructing non-default forward or reverse memmem finders.
A builder is primarily useful for configuring a substring searcher. Currently, the only configuration exposed is the ability to disable heuristic prefilters used to speed up certain searches.
Implementations
impl FinderBuilder
fn new() -> FinderBuilderCreate a new finder builder with default settings.
fn build_forward<'n, B: ?Sized + AsRef<[u8]>>(&self, needle: &'n B) -> Finder<'n>Build a forward finder using the given needle from the current settings.
fn build_forward_owned<B: Into<Box<[u8]>>>(&self, needle: B) -> Finder<'static>Build an owned forward finder using the given needle from the current settings.
fn build_forward_with_ranker<'n, R: HeuristicFrequencyRank, B: ?Sized + AsRef<[u8]>>(&self, ranker: R, needle: &'n B) -> Finder<'n>Build a forward finder using the given needle and a custom heuristic for determining the frequency of a given byte in the dataset. See
HeuristicFrequencyRankfor more details.fn build_forward_with_ranker_owned<R: HeuristicFrequencyRank, B: Into<Box<[u8]>>>(&self, ranker: R, needle: B) -> Finder<'static>Build an owned forward finder using the given needle and a custom heuristic for determining the frequency of a given byte in the dataset. See
HeuristicFrequencyRankfor more details.fn build_reverse<'n, B: ?Sized + AsRef<[u8]>>(&self, needle: &'n B) -> FinderRev<'n>Build a reverse finder using the given needle from the current settings.
fn build_reverse_owned<B: Into<Box<[u8]>>>(&self, needle: B) -> FinderRev<'static>Build an owned reverse finder using the given needle from the current settings.
fn prefilter(&mut self, prefilter: Prefilter) -> &mut FinderBuilderConfigure the prefilter setting for the finder.
See the documentation for
Prefilterfor more discussion on why you might want to configure this.
Trait Implementations
impl Clone for FinderBuilder
fn clone(&self) -> Self
impl Debug for FinderBuilder
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for FinderBuilder
fn default() -> Self