pub enum StartKind {
Both,
Unanchored,
Anchored,
}
dfa-search
and (crate features dfa-search
or dfa-onepass
) only.Expand description
The kind of anchored starting configurations to support in a DFA.
Fully compiled DFAs need to be explicitly configured as to which anchored
starting configurations to support. The reason for not just supporting
everything unconditionally is that it can use more resources (such as
memory and build time). The downside of this is that if you try to execute
a search using an Anchored
mode that is not supported
by the DFA, then the search will return an error.
Variants§
Both
Support both anchored and unanchored searches.
Unanchored
Support only unanchored searches. Requesting an anchored search will panic.
Note that even if an unanchored search is requested, the pattern itself
may still be anchored. For example, ^abc
will only match abc
at the
start of a haystack. This will remain true, even if the regex engine
only supported unanchored searches.
Anchored
Support only anchored searches. Requesting an unanchored search will panic.
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
)