@@ -1618,7 +1618,13 @@ impl<B, I: ExactSizeIterator, F> ExactSizeIterator for Map<I, F> where
1618
1618
impl < A , B > ExactSizeIterator for Zip < A , B >
1619
1619
where A : ExactSizeIterator , B : ExactSizeIterator { }
1620
1620
1621
- /// An double-ended iterator with the direction inverted
1621
+ /// An double-ended iterator with the direction inverted.
1622
+ ///
1623
+ /// This `struct` is created by the [`rev()`] method on [`Iterator`]. See its
1624
+ /// documentation for more.
1625
+ ///
1626
+ /// [`rev()`]: trait.Iterator.html#method.rev
1627
+ /// [`Iterator`]: trait.Iterator.html
1622
1628
#[ derive( Clone ) ]
1623
1629
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1624
1630
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1642,7 +1648,13 @@ impl<I> DoubleEndedIterator for Rev<I> where I: DoubleEndedIterator {
1642
1648
fn next_back ( & mut self ) -> Option < <I as Iterator >:: Item > { self . iter . next ( ) }
1643
1649
}
1644
1650
1645
- /// An iterator that clones the elements of an underlying iterator
1651
+ /// An iterator that clones the elements of an underlying iterator.
1652
+ ///
1653
+ /// This `struct` is created by the [`cloned()`] method on [`Iterator`]. See its
1654
+ /// documentation for more.
1655
+ ///
1656
+ /// [`cloned()`]: trait.Iterator.html#method.cloned
1657
+ /// [`Iterator`]: trait.Iterator.html
1646
1658
#[ stable( feature = "iter_cloned" , since = "1.1.0" ) ]
1647
1659
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1648
1660
#[ derive( Clone ) ]
@@ -1679,7 +1691,13 @@ impl<'a, I, T: 'a> ExactSizeIterator for Cloned<I>
1679
1691
where I : ExactSizeIterator < Item =& ' a T > , T : Clone
1680
1692
{ }
1681
1693
1682
- /// An iterator that repeats endlessly
1694
+ /// An iterator that repeats endlessly.
1695
+ ///
1696
+ /// This `struct` is created by the [`cycle()`] method on [`Iterator`]. See its
1697
+ /// documentation for more.
1698
+ ///
1699
+ /// [`cycle()`]: trait.Iterator.html#method.cycle
1700
+ /// [`Iterator`]: trait.Iterator.html
1683
1701
#[ derive( Clone ) ]
1684
1702
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1685
1703
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1711,7 +1729,13 @@ impl<I> Iterator for Cycle<I> where I: Clone + Iterator {
1711
1729
}
1712
1730
}
1713
1731
1714
- /// An iterator that strings two iterators together
1732
+ /// An iterator that strings two iterators together.
1733
+ ///
1734
+ /// This `struct` is created by the [`chain()`] method on [`Iterator`]. See its
1735
+ /// documentation for more.
1736
+ ///
1737
+ /// [`chain()`]: trait.Iterator.html#method.chain
1738
+ /// [`Iterator`]: trait.Iterator.html
1715
1739
#[ derive( Clone ) ]
1716
1740
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1717
1741
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1849,7 +1873,13 @@ impl<A, B> DoubleEndedIterator for Chain<A, B> where
1849
1873
}
1850
1874
}
1851
1875
1852
- /// An iterator that iterates two other iterators simultaneously
1876
+ /// An iterator that iterates two other iterators simultaneously.
1877
+ ///
1878
+ /// This `struct` is created by the [`zip()`] method on [`Iterator`]. See its
1879
+ /// documentation for more.
1880
+ ///
1881
+ /// [`zip()`]: trait.Iterator.html#method.zip
1882
+ /// [`Iterator`]: trait.Iterator.html
1853
1883
#[ derive( Clone ) ]
1854
1884
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1855
1885
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1915,7 +1945,13 @@ impl<A, B> DoubleEndedIterator for Zip<A, B> where
1915
1945
}
1916
1946
}
1917
1947
1918
- /// An iterator that maps the values of `iter` with `f`
1948
+ /// An iterator that maps the values of `iter` with `f`.
1949
+ ///
1950
+ /// This `struct` is created by the [`map()`] method on [`Iterator`]. See its
1951
+ /// documentation for more.
1952
+ ///
1953
+ /// [`map()`]: trait.Iterator.html#method.map
1954
+ /// [`Iterator`]: trait.Iterator.html
1919
1955
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1920
1956
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1921
1957
#[ derive( Clone ) ]
@@ -1949,7 +1985,13 @@ impl<B, I: DoubleEndedIterator, F> DoubleEndedIterator for Map<I, F> where
1949
1985
}
1950
1986
}
1951
1987
1952
- /// An iterator that filters the elements of `iter` with `predicate`
1988
+ /// An iterator that filters the elements of `iter` with `predicate`.
1989
+ ///
1990
+ /// This `struct` is created by the [`filter()`] method on [`Iterator`]. See its
1991
+ /// documentation for more.
1992
+ ///
1993
+ /// [`filter()`]: trait.Iterator.html#method.filter
1994
+ /// [`Iterator`]: trait.Iterator.html
1953
1995
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1954
1996
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1955
1997
#[ derive( Clone ) ]
@@ -1994,7 +2036,13 @@ impl<I: DoubleEndedIterator, P> DoubleEndedIterator for Filter<I, P>
1994
2036
}
1995
2037
}
1996
2038
1997
- /// An iterator that uses `f` to both filter and map elements from `iter`
2039
+ /// An iterator that uses `f` to both filter and map elements from `iter`.
2040
+ ///
2041
+ /// This `struct` is created by the [`filter_map()`] method on [`Iterator`]. See its
2042
+ /// documentation for more.
2043
+ ///
2044
+ /// [`filter_map()`]: trait.Iterator.html#method.filter_map
2045
+ /// [`Iterator`]: trait.Iterator.html
1998
2046
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1999
2047
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2000
2048
#[ derive( Clone ) ]
@@ -2041,7 +2089,13 @@ impl<B, I: DoubleEndedIterator, F> DoubleEndedIterator for FilterMap<I, F>
2041
2089
}
2042
2090
}
2043
2091
2044
- /// An iterator that yields the current count and the element during iteration
2092
+ /// An iterator that yields the current count and the element during iteration.
2093
+ ///
2094
+ /// This `struct` is created by the [`enumerate()`] method on [`Iterator`]. See its
2095
+ /// documentation for more.
2096
+ ///
2097
+ /// [`enumerate()`]: trait.Iterator.html#method.enumerate
2098
+ /// [`Iterator`]: trait.Iterator.html
2045
2099
#[ derive( Clone ) ]
2046
2100
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2047
2101
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -2108,7 +2162,14 @@ impl<I> DoubleEndedIterator for Enumerate<I> where
2108
2162
}
2109
2163
}
2110
2164
2111
- /// An iterator with a `peek()` that returns an optional reference to the next element.
2165
+ /// An iterator with a `peek()` that returns an optional reference to the next
2166
+ /// element.
2167
+ ///
2168
+ /// This `struct` is created by the [`peekable()`] method on [`Iterator`]. See its
2169
+ /// documentation for more.
2170
+ ///
2171
+ /// [`peekable()`]: trait.Iterator.html#method.peekable
2172
+ /// [`Iterator`]: trait.Iterator.html
2112
2173
#[ derive( Clone ) ]
2113
2174
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2114
2175
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -2190,7 +2251,13 @@ impl<I: Iterator> Peekable<I> {
2190
2251
}
2191
2252
}
2192
2253
2193
- /// An iterator that rejects elements while `predicate` is true
2254
+ /// An iterator that rejects elements while `predicate` is true.
2255
+ ///
2256
+ /// This `struct` is created by the [`skip_while()`] method on [`Iterator`]. See its
2257
+ /// documentation for more.
2258
+ ///
2259
+ /// [`skip_while()`]: trait.Iterator.html#method.skip_while
2260
+ /// [`Iterator`]: trait.Iterator.html
2194
2261
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2195
2262
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2196
2263
#[ derive( Clone ) ]
@@ -2224,7 +2291,13 @@ impl<I: Iterator, P> Iterator for SkipWhile<I, P>
2224
2291
}
2225
2292
}
2226
2293
2227
- /// An iterator that only accepts elements while `predicate` is true
2294
+ /// An iterator that only accepts elements while `predicate` is true.
2295
+ ///
2296
+ /// This `struct` is created by the [`take_while()`] method on [`Iterator`]. See its
2297
+ /// documentation for more.
2298
+ ///
2299
+ /// [`take_while()`]: trait.Iterator.html#method.take_while
2300
+ /// [`Iterator`]: trait.Iterator.html
2228
2301
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2229
2302
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2230
2303
#[ derive( Clone ) ]
@@ -2264,6 +2337,12 @@ impl<I: Iterator, P> Iterator for TakeWhile<I, P>
2264
2337
}
2265
2338
2266
2339
/// An iterator that skips over `n` elements of `iter`.
2340
+ ///
2341
+ /// This `struct` is created by the [`skip()`] method on [`Iterator`]. See its
2342
+ /// documentation for more.
2343
+ ///
2344
+ /// [`skip()`]: trait.Iterator.html#method.skip
2345
+ /// [`Iterator`]: trait.Iterator.html
2267
2346
#[ derive( Clone ) ]
2268
2347
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2269
2348
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -2338,6 +2417,12 @@ impl<I> Iterator for Skip<I> where I: Iterator {
2338
2417
impl < I > ExactSizeIterator for Skip < I > where I : ExactSizeIterator { }
2339
2418
2340
2419
/// An iterator that only iterates over the first `n` iterations of `iter`.
2420
+ ///
2421
+ /// This `struct` is created by the [`take()`] method on [`Iterator`]. See its
2422
+ /// documentation for more.
2423
+ ///
2424
+ /// [`take()`]: trait.Iterator.html#method.take
2425
+ /// [`Iterator`]: trait.Iterator.html
2341
2426
#[ derive( Clone ) ]
2342
2427
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2343
2428
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -2393,7 +2478,13 @@ impl<I> Iterator for Take<I> where I: Iterator{
2393
2478
impl < I > ExactSizeIterator for Take < I > where I : ExactSizeIterator { }
2394
2479
2395
2480
2396
- /// An iterator to maintain state while iterating another iterator
2481
+ /// An iterator to maintain state while iterating another iterator.
2482
+ ///
2483
+ /// This `struct` is created by the [`scan()`] method on [`Iterator`]. See its
2484
+ /// documentation for more.
2485
+ ///
2486
+ /// [`scan()`]: trait.Iterator.html#method.scan
2487
+ /// [`Iterator`]: trait.Iterator.html
2397
2488
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2398
2489
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2399
2490
#[ derive( Clone ) ]
@@ -2422,9 +2513,14 @@ impl<B, I, St, F> Iterator for Scan<I, St, F> where
2422
2513
}
2423
2514
}
2424
2515
2425
- /// An iterator that maps each element to an iterator,
2426
- /// and yields the elements of the produced iterators
2516
+ /// An iterator that maps each element to an iterator, and yields the elements
2517
+ /// of the produced iterators.
2427
2518
///
2519
+ /// This `struct` is created by the [`flat_map()`] method on [`Iterator`]. See its
2520
+ /// documentation for more.
2521
+ ///
2522
+ /// [`flat_map()`]: trait.Iterator.html#method.flat_map
2523
+ /// [`Iterator`]: trait.Iterator.html
2428
2524
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2429
2525
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2430
2526
#[ derive( Clone ) ]
@@ -2493,8 +2589,11 @@ impl<I: DoubleEndedIterator, U, F> DoubleEndedIterator for FlatMap<I, U, F> wher
2493
2589
/// An iterator that yields `None` forever after the underlying iterator
2494
2590
/// yields `None` once.
2495
2591
///
2496
- /// These can be created through
2497
- /// [`iter.fuse()`](trait.Iterator.html#method.fuse).
2592
+ /// This `struct` is created by the [`fuse()`] method on [`Iterator`]. See its
2593
+ /// documentation for more.
2594
+ ///
2595
+ /// [`fuse()`]: trait.Iterator.html#method.fuse
2596
+ /// [`Iterator`]: trait.Iterator.html
2498
2597
#[ derive( Clone ) ]
2499
2598
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2500
2599
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -2574,8 +2673,14 @@ impl<I> DoubleEndedIterator for Fuse<I> where I: DoubleEndedIterator {
2574
2673
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2575
2674
impl < I > ExactSizeIterator for Fuse < I > where I : ExactSizeIterator { }
2576
2675
2577
- /// An iterator that calls a function with a reference to each
2578
- /// element before yielding it.
2676
+ /// An iterator that calls a function with a reference to each element before
2677
+ /// yielding it.
2678
+ ///
2679
+ /// This `struct` is created by the [`inspect()`] method on [`Iterator`]. See its
2680
+ /// documentation for more.
2681
+ ///
2682
+ /// [`inspect()`]: trait.Iterator.html#method.inspect
2683
+ /// [`Iterator`]: trait.Iterator.html
2579
2684
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
2580
2685
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2581
2686
#[ derive( Clone ) ]
@@ -3009,7 +3114,11 @@ impl<A: Step + One> Iterator for ops::RangeFrom<A> where
3009
3114
}
3010
3115
}
3011
3116
3012
- /// An iterator that repeats an element endlessly
3117
+ /// An iterator that repeats an element endlessly.
3118
+ ///
3119
+ /// This `struct` is created by the [`repeat()`] function. See its documentation for more.
3120
+ ///
3121
+ /// [`repeat()`]: fn.repeat.html
3013
3122
#[ derive( Clone ) ]
3014
3123
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3015
3124
pub struct Repeat < A > {
@@ -3040,6 +3149,10 @@ pub fn repeat<T: Clone>(elt: T) -> Repeat<T> {
3040
3149
}
3041
3150
3042
3151
/// An iterator that yields nothing.
3152
+ ///
3153
+ /// This `struct` is created by the [`empty()`] function. See its documentation for more.
3154
+ ///
3155
+ /// [`empty()`]: fn.empty.html
3043
3156
#[ stable( feature = "iter_empty" , since = "1.2.0" ) ]
3044
3157
pub struct Empty < T > ( marker:: PhantomData < T > ) ;
3045
3158
@@ -3095,6 +3208,10 @@ pub fn empty<T>() -> Empty<T> {
3095
3208
}
3096
3209
3097
3210
/// An iterator that yields an element exactly once.
3211
+ ///
3212
+ /// This `struct` is created by the [`once()`] function. See its documentation for more.
3213
+ ///
3214
+ /// [`once()`]: fn.once.html
3098
3215
#[ derive( Clone ) ]
3099
3216
#[ stable( feature = "iter_once" , since = "1.2.0" ) ]
3100
3217
pub struct Once < T > {
0 commit comments