@@ -249,6 +249,10 @@ impl SetMatches {
249249 }
250250
251251 /// 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.
252256 pub fn iter( & self ) -> SetMatchesIter {
253257 SetMatchesIter ( ( & * self . matches) . into_iter( ) . enumerate( ) )
254258 }
@@ -273,6 +277,10 @@ impl<'a> IntoIterator for &'a SetMatches {
273277}
274278
275279/// 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.
276284pub struct SetMatchesIntoIter ( iter:: Enumerate <vec:: IntoIter <bool >>) ;
277285
278286impl Iterator for SetMatchesIntoIter {
@@ -304,6 +312,10 @@ impl DoubleEndedIterator for SetMatchesIntoIter {
304312/// A borrowed iterator over the set of matches from a regex set.
305313///
306314/// 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.
307319 #[ derive( Clone ) ]
308320pub struct SetMatchesIter <' a>( iter:: Enumerate <slice:: Iter <' a, bool >>) ;
309321
0 commit comments