21
21
//! of other types, and you can implement them for your types too. As such,
22
22
//! you'll see a few different types of I/O throughout the documentation in
23
23
//! this module: [`File`]s, [`TcpStream`]s, and sometimes even [`Vec<T>`]s. For
24
- //! example, `Read` adds a `read()` method, which we can use on `File`s:
24
+ //! example, [ `Read`] adds a [ `read()`] method, which we can use on `File`s:
25
25
//!
26
26
//! ```
27
27
//! use std::io;
251
251
//! [`Lines`]: struct.Lines.html
252
252
//! [`io::Result`]: type.Result.html
253
253
//! [`try!`]: ../macro.try.html
254
+ //! [`read()`]: trait.Read.html#tymethod.read
254
255
255
256
#![ stable( feature = "rust1" , since = "1.0.0" ) ]
256
257
@@ -814,19 +815,23 @@ pub trait Read {
814
815
///
815
816
/// Implementors of the `Write` trait are sometimes called 'writers'.
816
817
///
817
- /// Writers are defined by two required methods, `write()` and `flush()`:
818
+ /// Writers are defined by two required methods, [ `write()`] and [ `flush()`] :
818
819
///
819
- /// * The `write()` method will attempt to write some data into the object,
820
+ /// * The [ `write()`] method will attempt to write some data into the object,
820
821
/// returning how many bytes were successfully written.
821
822
///
822
- /// * The `flush()` method is useful for adaptors and explicit buffers
823
+ /// * The [ `flush()`] method is useful for adaptors and explicit buffers
823
824
/// themselves for ensuring that all buffered data has been pushed out to the
824
825
/// 'true sink'.
825
826
///
826
827
/// Writers are intended to be composable with one another. Many implementors
827
- /// throughout `std::io` take and provide types which implement the `Write`
828
+ /// throughout [ `std::io`] take and provide types which implement the `Write`
828
829
/// trait.
829
830
///
831
+ /// [`write()`]: #tymethod.write
832
+ /// [`flush()`]: #tymethod.flush
833
+ /// [`std::io`]: index.html
834
+ ///
830
835
/// # Examples
831
836
///
832
837
/// ```
@@ -1475,10 +1480,10 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> {
1475
1480
1476
1481
/// Reader adaptor which limits the bytes read from an underlying reader.
1477
1482
///
1478
- /// This struct is generally created by calling [`take()`][take] on a reader.
1479
- /// Please see the documentation of `take()` for more details.
1483
+ /// This struct is generally created by calling [`take()`] on a reader.
1484
+ /// Please see the documentation of [ `take()`] for more details.
1480
1485
///
1481
- /// [take]: trait.Read.html#method.take
1486
+ /// [` take()` ]: trait.Read.html#method.take
1482
1487
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1483
1488
pub struct Take < T > {
1484
1489
inner : T ,
@@ -1491,8 +1496,10 @@ impl<T> Take<T> {
1491
1496
///
1492
1497
/// # Note
1493
1498
///
1494
- /// This instance may reach EOF after reading fewer bytes than indicated by
1495
- /// this method if the underlying `Read` instance reaches EOF.
1499
+ /// This instance may reach `EOF` after reading fewer bytes than indicated by
1500
+ /// this method if the underlying [`Read`] instance reaches EOF.
1501
+ ///
1502
+ /// [`Read`]: ../../std/io/trait.Read.html
1496
1503
///
1497
1504
/// # Examples
1498
1505
///
0 commit comments