Enum StartKind
enum StartKind
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.
Implementations
impl Clone for StartKind
fn clone(self: &Self) -> StartKind
impl Copy for StartKind
impl Debug for StartKind
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for StartKind
fn default() -> StartKind
impl Eq for StartKind
impl Freeze for StartKind
impl PartialEq for StartKind
fn eq(self: &Self, other: &StartKind) -> bool
impl RefUnwindSafe for StartKind
impl Send for StartKind
impl StructuralPartialEq for StartKind
impl Sync for StartKind
impl Unpin for StartKind
impl UnsafeUnpin for StartKind
impl UnwindSafe for StartKind
impl<T> Any for StartKind
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for StartKind
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for StartKind
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for StartKind
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for StartKind
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for StartKind
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for StartKind
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for StartKind
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for StartKind
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>