Struct memchr::memmem::FinderBuilder
source · [−]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
sourceimpl 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_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
sourceimpl Clone for FinderBuilder
impl Clone for FinderBuilder
sourcefn clone(&self) -> FinderBuilder
fn clone(&self) -> FinderBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FinderBuilder
impl Debug for FinderBuilder
sourceimpl Default for FinderBuilder
impl Default for FinderBuilder
sourcefn default() -> FinderBuilder
fn default() -> FinderBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for FinderBuilder
impl Send for FinderBuilder
impl Sync for FinderBuilder
impl Unpin for FinderBuilder
impl UnwindSafe for FinderBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more