@@ -229,17 +229,7 @@ types.
229
229
## ` AsFd ` , ` IntoFd ` , and ` FromFd `
230
230
231
231
These types provide ` as_fd ` , ` into_fd ` , and ` from_fd ` functions similar to
232
- their ` Raw ` counterparts, but with the benefit of a safe interface, it's safe
233
- to provide a few simple conveniences which make the API much more flexible:
234
-
235
- - A ` from_into_fd ` function which takes a ` IntoFd ` and converts it into a
236
- ` FromFd ` , allowing users to perform this common sequence in a single
237
- step, and without having to use ` unsafe ` .
238
-
239
- - A ` as_filelike_view::<T>() ` function returns a ` View ` , which contains a
240
- temporary ` ManuallyDrop ` instance of T constructed from the contained
241
- file descriptor, allowing users to "view" a raw file descriptor as a
242
- ` File ` , ` TcpStream ` , and so on.
232
+ their ` Raw ` counterparts.
243
233
244
234
## Prototype implementation
245
235
@@ -387,8 +377,15 @@ Some possible future ideas that could build on this RFC include:
387
377
that, with this new guarantee, the high-level wrappers around raw handles
388
378
are unforgeable in safe Rust.
389
379
390
- [ `from_filelike` ] : https://docs.rs/unsafe-io/0.6.2/unsafe_io/trait.FromUnsafeFile.html#method.from_filelike
391
- [ this wrapper around `posix_fadvise` ] : https://docs.rs/posish/0.6.1/posish/fs/fn.fadvise.html
380
+ - There are a few convenience features which can be implemented on top
381
+ of the basic ` As ` /` Into ` /` From ` traits:
382
+ - A ` from_into_fd ` function which takes a ` IntoFd ` and converts it into a
383
+ ` FromFd ` , allowing users to perform this common sequence in a single
384
+ step.
385
+ - A ` as_filelike_view::<T>() ` function returns a ` View ` , which contains a
386
+ temporary instance of T constructed from the contained file descriptor,
387
+ allowing users to "view" a raw file descriptor as a ` File ` , ` TcpStream ` ,
388
+ and so on.
392
389
393
390
# Thanks
394
391
[ thanks ] : #thanks
0 commit comments