diff options
author | Zahari Dichev <zaharidichev@gmail.com> | 2020-10-24 15:26:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-24 14:26:01 +0200 |
commit | ce173fdc918c5934561560a97d366fce6edb36d0 (patch) | |
tree | b02982334d44d76b405441b4c95c1fe6e7deb830 /tokio/src/net/unix/datagram/socket.rs | |
parent | e804f88d60071f0d89db85aaa4a073857904b545 (diff) |
docs: update docs for `from_std` functions (#3016)
Fixes: #3007
Diffstat (limited to 'tokio/src/net/unix/datagram/socket.rs')
-rw-r--r-- | tokio/src/net/unix/datagram/socket.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tokio/src/net/unix/datagram/socket.rs b/tokio/src/net/unix/datagram/socket.rs index 3ae66d1f..051c0d1e 100644 --- a/tokio/src/net/unix/datagram/socket.rs +++ b/tokio/src/net/unix/datagram/socket.rs @@ -149,11 +149,12 @@ impl UnixDatagram { Ok((a, b)) } - /// Consumes a `UnixDatagram` in the standard library and returns a - /// nonblocking `UnixDatagram` from this crate. + /// Creates new `UnixDatagram` from a `std::os::unix::net::UnixDatagram`. /// - /// The returned datagram will be associated with the given event loop - /// specified by `handle` and is ready to perform I/O. + /// This function is intended to be used to wrap a UnixDatagram from the + /// standard library in the Tokio equivalent. The conversion assumes + /// nothing about the underlying datagram; it is left up to the user to set + /// it in non-blocking mode. /// /// # Panics /// |