Skip to main content

Module generic

Module generic 

Source
πŸ”¬This is a nightly-only experimental API. (alloc_io #154046)

ConstantsΒ§

IN_MEMORY πŸ”’ Experimental
Readers and writers with their entire contents have the highest priority.
UNBUFFERED πŸ”’ Experimental
Unbuffered readers and writers have the lowest priority.

TraitsΒ§

BufferedReaderSpec πŸ”’ Experimental
Specialization of the read-write loop in generic_copy that reuses the internal buffer of a BufReader. If there’s no buffer then the writer side should be used instead.
BufferedWriterSpec πŸ”’ Experimental
Specialization of the read-write loop in generic_copy that either uses a stack buffer or reuses the internal buffer of a BufWriter.

FunctionsΒ§

generic_copy πŸ”’ Experimental
The userspace read-write-loop implementation of io::copy that is used when OS-specific specializations for copy offloading are not available or not applicable.
stack_buffer_copy πŸ”’ Experimental
Copies from reader to writer using a stack-allocated buffer (a fixed sized array).

Type AliasesΒ§

BufferPriority πŸ”’ Experimental
This is used by generic_copy to decide whether to use BufferedReaderSpec::copy_to or BufferedWriterSpec::copy_from.