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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.