@@ -1301,6 +1301,11 @@ trait SplitIter: DoubleEndedIterator {
1301
1301
1302
1302
/// An iterator over subslices separated by elements that match a predicate
1303
1303
/// function.
1304
+ ///
1305
+ /// This struct is created by the [`split`] method on [slices].
1306
+ ///
1307
+ /// [`split`]: ../../std/primitive.slice.html#method.split
1308
+ /// [slices]: ../../std/primitive.slice.html
1304
1309
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1305
1310
pub struct Split < ' a , T : ' a , P > where P : FnMut ( & T ) -> bool {
1306
1311
v : & ' a [ T ] ,
@@ -1387,6 +1392,11 @@ impl<'a, T, P> FusedIterator for Split<'a, T, P> where P: FnMut(&T) -> bool {}
1387
1392
1388
1393
/// An iterator over the subslices of the vector which are separated
1389
1394
/// by elements that match `pred`.
1395
+ ///
1396
+ /// This struct is created by the [`split_mut`] method on [slices].
1397
+ ///
1398
+ /// [`split_mut`]: ../../std/primitive.slice.html#method.split_mut
1399
+ /// [slices]: ../../std/primitive.slice.html
1390
1400
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1391
1401
pub struct SplitMut < ' a , T : ' a , P > where P : FnMut ( & T ) -> bool {
1392
1402
v : & ' a mut [ T ] ,
@@ -1512,6 +1522,11 @@ impl<T, I: SplitIter<Item=T>> Iterator for GenericSplitN<I> {
1512
1522
1513
1523
/// An iterator over subslices separated by elements that match a predicate
1514
1524
/// function, limited to a given number of splits.
1525
+ ///
1526
+ /// This struct is created by the [`splitn`] method on [slices].
1527
+ ///
1528
+ /// [`splitn`]: ../../std/primitive.slice.html#method.splitn
1529
+ /// [slices]: ../../std/primitive.slice.html
1515
1530
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1516
1531
pub struct SplitN < ' a , T : ' a , P > where P : FnMut ( & T ) -> bool {
1517
1532
inner : GenericSplitN < Split < ' a , T , P > >
@@ -1529,6 +1544,11 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitN<'a, T, P> where P: FnMut(&
1529
1544
/// An iterator over subslices separated by elements that match a
1530
1545
/// predicate function, limited to a given number of splits, starting
1531
1546
/// from the end of the slice.
1547
+ ///
1548
+ /// This struct is created by the [`rsplitn`] method on [slices].
1549
+ ///
1550
+ /// [`rsplitn`]: ../../std/primitive.slice.html#method.rsplitn
1551
+ /// [slices]: ../../std/primitive.slice.html
1532
1552
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1533
1553
pub struct RSplitN < ' a , T : ' a , P > where P : FnMut ( & T ) -> bool {
1534
1554
inner : GenericSplitN < Split < ' a , T , P > >
@@ -1545,6 +1565,11 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitN<'a, T, P> where P: FnMut(
1545
1565
1546
1566
/// An iterator over subslices separated by elements that match a predicate
1547
1567
/// function, limited to a given number of splits.
1568
+ ///
1569
+ /// This struct is created by the [`splitn_mut`] method on [slices].
1570
+ ///
1571
+ /// [`splitn_mut`]: ../../std/primitive.slice.html#method.splitn_mut
1572
+ /// [slices]: ../../std/primitive.slice.html
1548
1573
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1549
1574
pub struct SplitNMut < ' a , T : ' a , P > where P : FnMut ( & T ) -> bool {
1550
1575
inner : GenericSplitN < SplitMut < ' a , T , P > >
@@ -1562,6 +1587,11 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitNMut<'a, T, P> where P: FnMu
1562
1587
/// An iterator over subslices separated by elements that match a
1563
1588
/// predicate function, limited to a given number of splits, starting
1564
1589
/// from the end of the slice.
1590
+ ///
1591
+ /// This struct is created by the [`rsplitn_mut`] method on [slices].
1592
+ ///
1593
+ /// [`rsplitn_mut`]: ../../std/primitive.slice.html#method.rsplitn_mut
1594
+ /// [slices]: ../../std/primitive.slice.html
1565
1595
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1566
1596
pub struct RSplitNMut < ' a , T : ' a , P > where P : FnMut ( & T ) -> bool {
1567
1597
inner : GenericSplitN < SplitMut < ' a , T , P > >
@@ -1607,6 +1637,11 @@ forward_iterator! { SplitNMut: T, &'a mut [T] }
1607
1637
forward_iterator ! { RSplitNMut : T , & ' a mut [ T ] }
1608
1638
1609
1639
/// An iterator over overlapping subslices of length `size`.
1640
+ ///
1641
+ /// This struct is created by the [`windows`] method on [slices].
1642
+ ///
1643
+ /// [`windows`]: ../../std/primitive.slice.html#method.windows
1644
+ /// [slices]: ../../std/primitive.slice.html
1610
1645
#[ derive( Debug ) ]
1611
1646
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1612
1647
pub struct Windows < ' a , T : ' a > {
@@ -1704,6 +1739,11 @@ impl<'a, T> FusedIterator for Windows<'a, T> {}
1704
1739
///
1705
1740
/// When the slice len is not evenly divided by the chunk size, the last slice
1706
1741
/// of the iteration will be the remainder.
1742
+ ///
1743
+ /// This struct is created by the [`chunks`] method on [slices].
1744
+ ///
1745
+ /// [`chunks`]: ../../std/primitive.slice.html#method.chunks
1746
+ /// [slices]: ../../std/primitive.slice.html
1707
1747
#[ derive( Debug ) ]
1708
1748
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1709
1749
pub struct Chunks < ' a , T : ' a > {
@@ -1808,6 +1848,11 @@ impl<'a, T> FusedIterator for Chunks<'a, T> {}
1808
1848
/// An iterator over a slice in (non-overlapping) mutable chunks (`size`
1809
1849
/// elements at a time). When the slice len is not evenly divided by the chunk
1810
1850
/// size, the last slice of the iteration will be the remainder.
1851
+ ///
1852
+ /// This struct is created by the [`chunks_mut`] method on [slices].
1853
+ ///
1854
+ /// [`chunks_mut`]: ../../std/primitive.slice.html#method.chunks_mut
1855
+ /// [slices]: ../../std/primitive.slice.html
1811
1856
#[ derive( Debug ) ]
1812
1857
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1813
1858
pub struct ChunksMut < ' a , T : ' a > {
0 commit comments