pub struct FinderBuilder { /* private fields */ }
Expand description
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§
Source§impl FinderBuilder
impl FinderBuilder
Sourcepub fn new() -> FinderBuilder
pub fn new() -> FinderBuilder
Create a new finder builder with default settings.
Sourcepub fn build_forward<'n, B: ?Sized + AsRef<[u8]>>(
&self,
needle: &'n B,
) -> Finder<'n>
pub 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.
Sourcepub fn build_forward_with_ranker<'n, R: HeuristicFrequencyRank, B: ?Sized + AsRef<[u8]>>(
&self,
ranker: R,
needle: &'n B,
) -> Finder<'n>
pub 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 HeuristicFrequencyRank
for more details.
Sourcepub fn build_reverse<'n, B: ?Sized + AsRef<[u8]>>(
&self,
needle: &'n B,
) -> FinderRev<'n>
pub 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.
Sourcepub fn prefilter(&mut self, prefilter: Prefilter) -> &mut FinderBuilder
pub fn prefilter(&mut self, prefilter: Prefilter) -> &mut FinderBuilder
Configure the prefilter setting for the finder.
See the documentation for Prefilter
for more discussion on why
you might want to configure this.
Trait Implementations§
Source§impl Clone for FinderBuilder
impl Clone for FinderBuilder
Source§fn clone(&self) -> FinderBuilder
fn clone(&self) -> FinderBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FinderBuilder
impl Debug for FinderBuilder
Source§impl Default for FinderBuilder
impl Default for FinderBuilder
Source§fn default() -> FinderBuilder
fn default() -> FinderBuilder
Auto Trait Implementations§
impl Freeze for FinderBuilder
impl RefUnwindSafe for FinderBuilder
impl Send for FinderBuilder
impl Sync for FinderBuilder
impl Unpin for FinderBuilder
impl UnwindSafe for FinderBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)