Type Alias async_ringbuf::wrap::AsyncCons

source ·
pub type AsyncCons<R> = AsyncWrap<R, false, true>;

Aliased Type§

struct AsyncCons<R> { /* private fields */ }

Trait Implementations§

source§

impl<R: AsyncRbRef> AsyncConsumer for AsyncCons<R>

source§

fn register_waker(&self, waker: &Waker)

source§

fn close(&mut self)

source§

fn is_closed(&self) -> bool

Whether the corresponding producer was closed.
source§

fn pop(&mut self) -> PopFuture<'_, Self>

Pop item from the ring buffer waiting asynchronously if the buffer is empty. Read more
source§

fn wait_occupied(&mut self, count: usize) -> WaitOccupiedFuture<'_, Self>

Wait for the buffer to contain at least count items or to close. Read more
source§

fn pop_until_end<'a: 'b, 'b>( &'a mut self, vec: &'b mut Vec<Self::Item>, ) -> PopVecFuture<'a, 'b, Self>

source§

fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>
where Self: Unpin,

source§

impl<R: AsyncRbRef> AsyncRead for AsyncCons<R>
where Self: AsyncConsumer<Item = u8>,

source§

fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
source§

impl<R: AsyncRbRef> Stream for AsyncCons<R>

§

type Item = <<R as RbRef>::Rb as Observer>::Item

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
source§

impl<R: AsyncRbRef> DelegateConsumer for AsyncCons<R>