about summary refs log tree commit diff
path: root/library/std/src/io/copy.rs
AgeCommit message (Collapse)AuthorLines
2022-08-18Address reviewer commentsNick Cameron-1/+1
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-08-05non-linux platformsNick Cameron-4/+4
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-08-04std::io: migrate ReadBuf to BorrowBuf/BorrowCursorNick Cameron-16/+18
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-03-29Warn that platform-specific behavior may changeMartin Pool-0/+4
2022-03-24Document Linux kernel handoff in std::io::copy and std::fs::copyMartin Pool-0/+6
2021-11-02fix test failure from trying to assume_init too muchDrMeepster-1/+1
2021-11-02Don't reinitialize hereDrMeepster-1/+8
2021-11-02read_bufDrMeepster-43/+31
2021-02-24library: Normalize safety-for-unsafe-block commentsMiguel Ojeda-1/+1
Almost all safety comments are of the form `// SAFETY:`, so normalize the rest and fix a few of them that should have been a `/// # Safety` section instead. Furthermore, make `tidy` only allow the uppercase form. While currently `tidy` only checks `core`, it is a good idea to prevent `core` from drifting to non-uppercase comments, so that later we can start checking `alloc` etc. too. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-01-31specialize io::copy to use the memory of the writer if it is a BufWriterThe8472-6/+74
2020-11-13limit visibility of copy offload helpers to sys::unix moduleThe8472-3/+0
2020-11-13move copy specialization tests to their own moduleThe8472-0/+3
2020-11-13move copy specialization into sys::unix moduleThe8472-377/+8
2020-11-13reduce syscalls by inferring FD types based on source struct instead of ↵The8472-66/+102
calling stat() also adds handling for edge-cases involving large sparse files where sendfile could fail with EOVERFLOW
2020-11-13add forwarding specializations for &mut variantsThe8472-0/+21
`impl Write for &mut T where T: Write`, thus the same should apply to the specialization traits
2020-11-13prioritize sendfile over splice since it results in fewer context switches ↵The8472-16/+16
when sending to pipes splice returns to userspace when the pipe is full, sendfile just blocks until it's done, this can achieve much higher throughput
2020-11-13move tests module into separate fileThe8472-56/+0
2020-11-13specialize io::copy to use copy_file_range, splice or sendfileThe8472-0/+456
Currently it only applies to linux systems. It can be extended to make use of similar syscalls on other unix systems.