Skip to main content

CopyState

Enum CopyState 

Source
#[doc(hidden)]
pub enum CopyState { Ended(u64), Fallback(u64), }
🔬This is a nightly-only experimental API. (core_io_internals)
Expand description

Used as a part of copy specialization to communicate how many bytes were copied, and whether copying is done.

  • Ended(n) indicates copying completed, moving a total of n bytes.
  • Fallback(n) indicates copying is might not be complete, and so far n bytes have been copied using specialization. The remaining must be copied using a fallback implementation.

If a particular Read and Write combination do not implement a specialized copy routine, the specialized function will return Fallback(0).

Variants§

§

Ended(u64)

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

Fallback(u64)

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

Trait Implementations§

Source§

impl Debug for CopyState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more