Struct async_ringbuffer::Reader
[−]
[src]
pub struct Reader(_);
Read access to a nonblocking ring buffer with fixed capacity.
If there is no data in the buffer to read from, the current task is parked and notified once data becomes available.
Trait Implementations
impl Drop for Reader
[src]
impl AsyncRead for Reader
[src]
fn poll_read(&mut self, cx: &mut Context, buf: &mut [u8]) -> Poll<usize, Error>
[src]
Read data from the RingBuffer.
This only returns Ok(Ready(0))
if either buf.len() == 0
, poll_close
was called on the corresponding Writer
and all buffered data has been read, or if the
corresponding Writer
has been dropped.
Errors
This never emits an error.
unsafe fn initializer(&self) -> Initializer
[src]
Determines if this AsyncRead
er can work with buffers of uninitialized memory. Read more
fn poll_vectored_read(
&mut self,
cx: &mut Context,
vec: &mut [&mut IoVec]
) -> Result<Async<usize>, Error>
[src]
&mut self,
cx: &mut Context,
vec: &mut [&mut IoVec]
) -> Result<Async<usize>, Error>
Attempt to read from the AsyncRead
into vec
using vectored IO operations. Read more