1
Fork 0

specialize io::copy to use copy_file_range, splice or sendfile

Currently it only applies to linux systems. It can be extended to make use
of similar syscalls on other unix systems.
This commit is contained in:
The8472 2020-07-29 00:35:01 +02:00
parent 35debd4c11
commit 16236470c1
7 changed files with 540 additions and 80 deletions

View file

@ -266,6 +266,8 @@ pub use self::buffered::IntoInnerError;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::buffered::{BufReader, BufWriter, LineWriter};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::copy::copy;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::cursor::Cursor;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::error::{Error, ErrorKind, Result};
@ -279,9 +281,12 @@ pub use self::stdio::{_eprint, _print};
#[doc(no_inline, hidden)]
pub use self::stdio::{set_panic, set_print};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::util::{copy, empty, repeat, sink, Empty, Repeat, Sink};
pub use self::util::{empty, repeat, sink, Empty, Repeat, Sink};
pub(crate) use self::copy::generic_copy;
mod buffered;
mod copy;
mod cursor;
mod error;
mod impls;