Hacker News new | ask | show | jobs
by zRedShift 1643 days ago
FWIW, the Read/Write traits have a vectored read/write method, which File implements using readv/writev on supporting Unix platforms:

https://doc.rust-lang.org/src/std/sys/unix/fd.rs.html#77

https://doc.rust-lang.org/src/std/sys/unix/fd.rs.html#144

Buf(Reader|Writer) are vectored I/O aware, bypassing the internal buffer whenever the total length of the provided buffers is larger:

https://doc.rust-lang.org/src/std/io/buffered/bufreader.rs.h...

https://doc.rust-lang.org/src/std/io/buffered/bufwriter.rs.h...