Struct regex::bytes::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 moresource§impl Debug for SetMatches
impl Debug for SetMatches
source§impl<'a> IntoIterator for &'a SetMatches
impl<'a> IntoIterator for &'a SetMatches
source§impl IntoIterator for SetMatches
impl IntoIterator for SetMatches
Auto Trait Implementations§
impl RefUnwindSafe for SetMatches
impl Send for SetMatches
impl Sync for SetMatches
impl Unpin for SetMatches
impl UnwindSafe for SetMatches
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