diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-07-22 12:56:50 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-07-22 12:56:50 -0400 |
| commit | 47f1286d5644a735b2d8af2f448492e627e2de0d (patch) | |
| tree | a868fc45e647e6fa79be5a01c5364f7c8ab92dfb /src/libstd | |
| parent | cc60f3f472afbf038b9f68895c83f0bb7821e2b8 (diff) | |
| parent | 7e7ec6b5cd78d16c260b251dfd69cc150332f83d (diff) | |
| download | rust-47f1286d5644a735b2d8af2f448492e627e2de0d.tar.gz rust-47f1286d5644a735b2d8af2f448492e627e2de0d.zip | |
Rollup merge of #27164 - steveklabnik:doc_io_utils, r=alexcrichton
These provide various special readers, so point their docs to their constructor functions in a manner consistent with everything else. r? @alexcrichton
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/util.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index c0bced26bef..dc29811ed5b 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -61,6 +61,11 @@ pub fn copy<R: Read, W: Write>(reader: &mut R, writer: &mut W) -> io::Result<u64 } /// A reader which is always at EOF. +/// +/// This struct is generally created by calling [`empty()`][empty]. Please see +/// the documentation of `empty()` for more details. +/// +/// [empty]: fn.empty.html #[stable(feature = "rust1", since = "1.0.0")] pub struct Empty { _priv: () } @@ -95,7 +100,12 @@ impl BufRead for Empty { fn consume(&mut self, _n: usize) {} } -/// A reader which infinitely yields one byte. +/// A reader which yields one byte over and over and over and over and over and... +/// +/// This struct is generally created by calling [`repeat()`][repeat]. Please +/// see the documentation of `repeat()` for more details. +/// +/// [empty]: fn.repeat.html #[stable(feature = "rust1", since = "1.0.0")] pub struct Repeat { byte: u8 } @@ -117,6 +127,11 @@ impl Read for Repeat { } /// A writer which will move data into the void. +/// +/// This struct is generally created by calling [`sink()`][sink]. Please +/// see the documentation of `sink()` for more details. +/// +/// [empty]: fn.sink.html #[stable(feature = "rust1", since = "1.0.0")] pub struct Sink { _priv: () } |
