Enum regex_test::SearchKind
source · pub enum SearchKind {
Earliest,
Leftmost,
Overlapping,
}
Expand description
Represents the type of search to perform.
When not specified in a test, the default is SearchKind::Leftmost
.
Variants§
Earliest
Report matches as soon as they are found.
This is somewhat tricky to test, as this semantic is specified in terms of whatever the regex engine can do. For exmaple, an automata oriented engine might be able to report a match earlier than a backtracking engine.
Leftmost
A standard leftmost search, returning either the leftmost-first or
leftmost-longest match. Generally speaking, it doesn’t make sense to
use this type of search in combination with MatchKind::All
.
Overlapping
Return all possible matches, including ones that overlap. Typically
this search kind is used in combination with MatchKind::All
.
Trait Implementations§
source§impl Clone for SearchKind
impl Clone for SearchKind
source§fn clone(&self) -> SearchKind
fn clone(&self) -> SearchKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SearchKind
impl Debug for SearchKind
source§impl Default for SearchKind
impl Default for SearchKind
source§fn default() -> SearchKind
fn default() -> SearchKind
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SearchKind
impl<'de> Deserialize<'de> for SearchKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<SearchKind> for SearchKind
impl PartialEq<SearchKind> for SearchKind
source§fn eq(&self, other: &SearchKind) -> bool
fn eq(&self, other: &SearchKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SearchKind
impl Eq for SearchKind
impl StructuralEq for SearchKind
impl StructuralPartialEq for SearchKind
Auto Trait Implementations§
impl RefUnwindSafe for SearchKind
impl Send for SearchKind
impl Sync for SearchKind
impl Unpin for SearchKind
impl UnwindSafe for SearchKind
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.