]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/io/copy.rs
Document Linux kernel handoff in std::io::copy and std::fs::copy
[rust.git] / library / std / src / io / copy.rs
index 6ab9666230524788b0d153e4e3eeab6cb9f0fb58..d446af0dad346326c04a6185f30c06ea6918e0b4 100644 (file)
 ///     Ok(())
 /// }
 /// ```
+///
+/// # Platform-specific behavior
+///
+/// On Linux (including Android), this function uses `copy_file_range(2)`,
+/// `sendfile(2)` or `splice(2)` syscalls to move data directly between file
+/// descriptors if possible.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> Result<u64>
 where