Skip to main content

SpecCopy

Trait SpecCopy 

Source
#[doc(hidden)]
pub trait SpecCopy: Read { // Required method fn copy<R: Read + ?Sized, W: Write + ?Sized>( _reader: &mut R, _writer: &mut W, ) -> Result<CopyState>; }
🔬This is a nightly-only experimental API. (core_io_internals)

Required Methods§

Source

fn copy<R: Read + ?Sized, W: Write + ?Sized>( _reader: &mut R, _writer: &mut W, ) -> Result<CopyState>

🔬This is a nightly-only experimental API. (core_io_internals)

Attempt to copy from this reader to the provided writer using a specialized process.

Note that this function does not take self as a parameter, and instead is passed a generic Read type R. This allows the Self type to provide specialized implementations for any combination of Read and Write types. However, in practice Self and types wrapping Self will be passed as the reader argument.

As of time of writing, &mut R, Take<R>, and BufReader<R> will forward to R for a specialized copy implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§