Skip to content

Commit ad816f8

Browse files
committed
Added links to std::net::Shutdown docs and made them more consistent
Part of #29363
1 parent 1a9c8ba commit ad816f8

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/libstd/net/mod.rs

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,30 @@ mod test;
4343
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
4444
#[stable(feature = "rust1", since = "1.0.0")]
4545
pub enum Shutdown {
46-
/// Indicates that the reading portion of this stream/socket should be shut
47-
/// down. All currently blocked and future reads will return `Ok(0)`.
46+
/// The reading portion of the [`TcpStream`] should be shut down.
47+
///
48+
/// All currently blocked and future [reads] will return [`Ok(0)`].
49+
///
50+
/// [`TcpStream`]: ../../std/net/struct.TcpStream.html
51+
/// [reads]: ../../std/io/trait.Read.html
52+
/// [`Ok(0)`]: ../../std/result/enum.Result.html#variant.Ok
4853
#[stable(feature = "rust1", since = "1.0.0")]
4954
Read,
50-
/// Indicates that the writing portion of this stream/socket should be shut
51-
/// down. All currently blocked and future writes will return an error.
55+
/// The writing portion of the [`TcpStream`] should be shut down.
56+
///
57+
/// All currently blocked and future [writes] will return an error.
58+
///
59+
/// [`TcpStream`]: ../../std/net/struct.TcpStream.html
60+
/// [writes]: ../../std/io/trait.Write.html
5261
#[stable(feature = "rust1", since = "1.0.0")]
5362
Write,
54-
/// Shut down both the reading and writing portions of this stream.
63+
/// Both the reading and the writing portions of the [`TcpStream`] should be shut down.
64+
///
65+
/// See [`Shutdown::Read`] and [`Shutdown::Write`] for more information.
5566
///
56-
/// See `Shutdown::Read` and `Shutdown::Write` for more information.
67+
/// [`TcpStream`]: ../../std/net/struct.TcpStream.html
68+
/// [`Shutdown::Read`]: #variant.Read
69+
/// [`Shutdown::Write`]: #variant.Write
5770
#[stable(feature = "rust1", since = "1.0.0")]
5871
Both,
5972
}

0 commit comments

Comments
 (0)