Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add more doc_cfg annotations (#1821)
Also makes the `tokio::net::{tcp, udp, unix}` modules only for "utility" types. The primary types are in `tokio::net` directly.
- Loading branch information
1 parent
3ecaa6d
commit 4ddc437
Showing
16 changed files
with
162 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
//! TCP bindings for `tokio`. | ||
//! | ||
//! This module contains the TCP networking types, similar to the standard | ||
//! library, which can be used to implement networking protocols. | ||
//! | ||
//! Connecting to an address, via TCP, can be done using [`TcpStream`]'s | ||
//! [`connect`] method, which returns a future which returns a `TcpStream`. | ||
//! | ||
//! To listen on an address [`TcpListener`] can be used. `TcpListener`'s | ||
//! [`incoming`][TcpListener::incoming] method can be used to accept new connections. | ||
//! It return the [`Incoming`] struct, which implements a stream which returns | ||
//! `TcpStream`s. | ||
//! | ||
//! [`TcpStream`]: struct.TcpStream.html | ||
//! [`connect`]: struct.TcpStream.html#method.connect | ||
//! [`TcpListener`]: struct.TcpListener.html | ||
//! TCP utility types | ||
|
||
mod listener; | ||
pub use listener::TcpListener; | ||
pub(crate) mod listener; | ||
pub(crate) use listener::TcpListener; | ||
|
||
mod incoming; | ||
pub use incoming::Incoming; | ||
|
||
mod split; | ||
pub use split::{ReadHalf, WriteHalf}; | ||
|
||
mod stream; | ||
pub use stream::TcpStream; | ||
pub(crate) mod stream; | ||
pub(crate) use stream::TcpStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
//! UDP bindings for `tokio`. | ||
//! | ||
//! This module contains the UDP networking types, similar to the standard | ||
//! library, which can be used to implement networking protocols. | ||
//! | ||
//! The main struct for UDP is the [`UdpSocket`], which represents a UDP socket. | ||
//! | ||
//! [`UdpSocket`]: struct.UdpSocket | ||
//! UDP utility types. | ||
|
||
mod socket; | ||
pub use socket::UdpSocket; | ||
pub(crate) mod socket; | ||
pub(crate) use socket::UdpSocket; | ||
|
||
mod split; | ||
pub use split::{RecvHalf, SendHalf, ReuniteError}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.