[−][src]Struct async_ringbuffer::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.
Methods
impl Reader
[src]
pub fn is_closed(&self) -> bool
[src]
Returns true if the writer side of the ringbuffer has been closed. Reads will continue to produce data as long as there are still unread bytes in the ringbuffer.
Trait Implementations
impl AsyncRead for Reader
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
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.
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
impl Drop for Reader
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Reader
impl !Send for Reader
impl !Sync for Reader
impl Unpin for Reader
impl !UnwindSafe for Reader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,