@@ -369,11 +369,15 @@ impl fmt::Display for Utf8Error {
369
369
Section: Iterators
370
370
*/
371
371
372
- /// Iterator for the char (representing *Unicode Scalar Values*) of a string.
372
+ /// An iterator over the [` char`]s of a string slice .
373
373
///
374
- /// Created with the method [`chars`].
374
+ /// [`char`]: ../../std/primitive.char.html
375
+ ///
376
+ /// This struct is created by the [`chars`] method on [`str`].
377
+ /// See its documentation for more.
375
378
///
376
379
/// [`chars`]: ../../std/primitive.str.html#method.chars
380
+ /// [`str`]: ../../std/primitive.str.html
377
381
#[ derive( Clone , Debug ) ]
378
382
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
379
383
pub struct Chars < ' a > {
@@ -553,7 +557,15 @@ impl<'a> Chars<'a> {
553
557
}
554
558
}
555
559
556
- /// Iterator for a string's characters and their byte offsets.
560
+ /// An iterator over the [`char`]s of a string slice, and their positions.
561
+ ///
562
+ /// [`char`]: ../../std/primitive.char.html
563
+ ///
564
+ /// This struct is created by the [`char_indices`] method on [`str`].
565
+ /// See its documentation for more.
566
+ ///
567
+ /// [`char_indices`]: ../../std/primitive.str.html#method.char_indices
568
+ /// [`str`]: ../../std/primitive.str.html
557
569
#[ derive( Clone , Debug ) ]
558
570
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
559
571
pub struct CharIndices < ' a > {
@@ -625,12 +637,13 @@ impl<'a> CharIndices<'a> {
625
637
}
626
638
}
627
639
628
- /// External iterator for a string's bytes.
629
- /// Use with the `std::iter` module.
640
+ /// An iterator over the bytes of a string slice.
630
641
///
631
- /// Created with the method [`bytes`].
642
+ /// This struct is created by the [`bytes`] method on [`str`].
643
+ /// See its documentation for more.
632
644
///
633
645
/// [`bytes`]: ../../std/primitive.str.html#method.bytes
646
+ /// [`str`]: ../../std/primitive.str.html
634
647
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
635
648
#[ derive( Clone , Debug ) ]
636
649
pub struct Bytes < ' a > ( Cloned < slice:: Iter < ' a , u8 > > ) ;
@@ -1161,9 +1174,13 @@ generate_pattern_iterators! {
1161
1174
delegate double ended;
1162
1175
}
1163
1176
1164
- /// Created with the method [`lines`].
1177
+ /// An iterator over the lines of a string, as string slices.
1178
+ ///
1179
+ /// This struct is created with the [`lines`] method on [`str`].
1180
+ /// See its documentation for more.
1165
1181
///
1166
1182
/// [`lines`]: ../../std/primitive.str.html#method.lines
1183
+ /// [`str`]: ../../std/primitive.str.html
1167
1184
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1168
1185
#[ derive( Clone , Debug ) ]
1169
1186
pub struct Lines < ' a > ( Map < SplitTerminator < ' a , char > , LinesAnyMap > ) ;
0 commit comments