Crate poll_buf_utils

Source
Expand description

This is an utility library for resumable byte transfers between buffers supported by the bytes crate and byte-streams which support the futures_io AsyncRead and/or AsyncWrite traits.

This crate assumes the following behavoirs about AsyncRead/AsyncWrite implementations: If the poll_* method call results in:

  • Poll::Ready(Ok(n)) with n != 0, bytes were successfully transferred

  • otherwise, we assume that the call failed and no bytes were transferred at all

Structs§

PollResult

Functions§

poll_read
This function tries to read at most delta_limit bytes from input to output.
poll_write