Struct non_std::dependencies::derive_tools::dependencies::parse_display::helpers::regex::bytes::SetMatches
[−]pub struct SetMatches { /* private fields */ }
Expand description
A set of matches returned by a regex set.
Implementations
impl SetMatches
impl SetMatches
pub fn matched_any(&self) -> bool
pub fn matched_any(&self) -> bool
Whether this set contains any matches.
pub 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()
.
pub fn iter(&self) -> SetMatchesIter<'_>ⓘNotable traits for SetMatchesIter<'a>impl<'a> Iterator for SetMatchesIter<'a> type Item = usize;
pub fn iter(&self) -> SetMatchesIter<'_>ⓘNotable traits for SetMatchesIter<'a>impl<'a> Iterator for SetMatchesIter<'a> type Item = usize;
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
impl Clone for SetMatches
impl Clone for SetMatches
fn clone(&self) -> SetMatches
fn clone(&self) -> SetMatches
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for SetMatches
impl Debug for SetMatches
impl IntoIterator for SetMatches
impl IntoIterator for SetMatches
type IntoIter = SetMatchesIntoIter
type IntoIter = SetMatchesIntoIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> <SetMatches as IntoIterator>::IntoIter
fn into_iter(self) -> <SetMatches as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
impl<'a> IntoIterator for &'a SetMatches
impl<'a> IntoIterator for &'a SetMatches
type IntoIter = SetMatchesIter<'a>
type IntoIter = SetMatchesIter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <&'a SetMatches as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a SetMatches as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
sourcefn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.