@@ -249,6 +249,10 @@ impl SetMatches {
249
249
}
250
250
251
251
/// Returns an iterator over indexes in the regex that matched.
252
+ ///
253
+ /// This will always produces matches in ascending order of index, where
254
+ /// the index corresponds to the index of the regex that matched with
255
+ /// respect to its position when initially building the set.
252
256
pub fn iter( & self ) -> SetMatchesIter {
253
257
SetMatchesIter ( ( & * self . matches) . into_iter( ) . enumerate( ) )
254
258
}
@@ -273,6 +277,10 @@ impl<'a> IntoIterator for &'a SetMatches {
273
277
}
274
278
275
279
/// An owned iterator over the set of matches from a regex set.
280
+ ///
281
+ /// This will always produces matches in ascending order of index, where the
282
+ /// index corresponds to the index of the regex that matched with respect to
283
+ /// its position when initially building the set.
276
284
pub struct SetMatchesIntoIter ( iter:: Enumerate <vec:: IntoIter <bool >>) ;
277
285
278
286
impl Iterator for SetMatchesIntoIter {
@@ -304,6 +312,10 @@ impl DoubleEndedIterator for SetMatchesIntoIter {
304
312
/// A borrowed iterator over the set of matches from a regex set.
305
313
///
306
314
/// The lifetime `'a` refers to the lifetime of a `SetMatches` value.
315
+ ///
316
+ /// This will always produces matches in ascending order of index, where the
317
+ /// index corresponds to the index of the regex that matched with respect to
318
+ /// its position when initially building the set.
307
319
#[ derive( Clone ) ]
308
320
pub struct SetMatchesIter <' a>( iter:: Enumerate <slice:: Iter <' a, bool >>) ;
309
321
0 commit comments