Struct regex::SetMatches
source · pub struct SetMatches { /* private fields */ }
Expand description
A set of matches returned by a regex set.
Implementations§
source§impl SetMatches
impl SetMatches
sourcepub fn matched_any(&self) -> bool
pub fn matched_any(&self) -> bool
Whether this set contains any matches.
sourcepub fn matched(&self, regex_index: usize) -> bool
pub fn matched(&self, regex_index: usize) -> bool
Whether the regex at the given index matched.
The index for a regex is determined by its insertion order upon the
initial construction of a RegexSet
, starting at 0
.
Panics
If regex_index
is greater than or equal to self.len()
.
sourcepub fn iter(&self) -> SetMatchesIter<'_> ⓘ
pub fn iter(&self) -> SetMatchesIter<'_> ⓘ
Returns an iterator over indexes in the regex that matched.
This will always produces matches in ascending order of index, where the index corresponds to the index of the regex that matched with respect to its position when initially building the set.
Trait Implementations§
source§impl Clone for SetMatches
impl Clone for SetMatches
source§fn clone(&self) -> SetMatches
fn clone(&self) -> SetMatches
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 more