2 ms·
>Does io::handle maybe exist only as an optimization for sendfile()? io::file exists for where it's needed to interface with the host system. io::stream is nee
by ddevault 4y ago
>Does io::handle maybe exist only as an optimization for sendfile()?
io::file exists for where it's needed to interface with the host system. io::stream is needed for userspace streams. io::handle is needed so that code which just wants to do I/O but doesn't care which of these two paradigms is in use can be useful for both.
- kragen 4y agoWhy can't that code just use io::stream directly then? Is there some obstacle I'm not understanding to wrapping an io::file in an io::stream?