Skip to content

Commit 3531f18

Browse files
committed
Describe implementations for TCPStream and UDPSocket
1 parent 7a1a73d commit 3531f18

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

text/0000-close-trait.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ impl<R: Close<Error = io::Error> + Write> Close for BufWriter<R> {
163163
}
164164
```
165165

166+
## TCPStream and UDPSocket
167+
168+
In a very similar way to a `File`, these two structs can implement `Close`. The
169+
outer, facade layer implements it by delegating to the inner. On each operating
170+
system we implement the `Close` trait for the wrapped version. The os-specific
171+
implementations are constructed in nearly the same way as for `File`s.
172+
166173
# Drawbacks
167174
[drawbacks]: #drawbacks
168175

0 commit comments

Comments
 (0)