Module kvarn::prelude::internals

source ·
Expand description

Prelude: internal

The purpose of this module is to expose the commonly used internals of Kvarn.

This is not part of the public API and may change rapidly

Re-exports

Modules

Structs

Functions

  • An adaptor between std’s Read and tokio’s AsyncRead traits. This should be used when you have a foreign type which implements read (on a Vec, for example) that returns immediately, because you buffered the actual read with tokio.
  • Reads reader to end into buffer. Also see read_to_end_or_max().
  • Reads from reader to buffer until it returns zero bytes or max_length is reached. BytesMut::len is used as a starting length of buffer.
  • Requires a Future to complete before the specified duration has elapsed.