Enum aho_corasick::StartKind
source · pub enum StartKind {
Both,
Unanchored,
Anchored,
}
Expand description
The kind of anchored starting configurations to support in an Aho-Corasick searcher.
Depending on which searcher is used internally by
AhoCorasick
, supporting both unanchored
and anchored searches can be quite costly. For this reason,
AhoCorasickBuilder::start_kind
can be used to configure whether your searcher supports unanchored,
anchored or both kinds of searches.
This searcher configuration knob works in concert with the search time
configuration Input::anchored
. Namely, if one requests an unsupported
anchored mode, then the search will either panic or return an error,
depending on whether you’re using infallible or fallibe APIs, respectively.
AhoCorasick
by default only supports unanchored searches.
Variants§
Both
Support both anchored and unanchored searches.
Unanchored
Support only unanchored searches. Requesting an anchored search will return an error in fallible APIs and panic in infallible APIs.
Anchored
Support only anchored searches. Requesting an unanchored search will return an error in fallible APIs and panic in infallible APIs.
Trait Implementations§
impl Copy for StartKind
impl Eq for StartKind
impl StructuralPartialEq for StartKind
Auto Trait Implementations§
impl Freeze for StartKind
impl RefUnwindSafe for StartKind
impl Send for StartKind
impl Sync for StartKind
impl Unpin for StartKind
impl UnwindSafe for StartKind
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
)