Type Alias async_ringbuf::wrap::AsyncProd
source · pub type AsyncProd<R> = AsyncWrap<R, true, false>;
Aliased Type§
struct AsyncProd<R> { /* private fields */ }
Trait Implementations§
source§impl<R: AsyncRbRef> AsyncProducer for AsyncProd<R>
impl<R: AsyncRbRef> AsyncProducer for AsyncProd<R>
fn register_waker(&self, waker: &Waker)
fn close(&mut self)
source§fn push(&mut self, item: Self::Item) -> PushFuture<'_, Self> ⓘ
fn push(&mut self, item: Self::Item) -> PushFuture<'_, Self> ⓘ
Push item to the ring buffer waiting asynchronously if the buffer is full. Read more
source§fn push_iter_all<I: Iterator<Item = Self::Item>>(
&mut self,
iter: I,
) -> PushIterFuture<'_, Self, I> ⓘ
fn push_iter_all<I: Iterator<Item = Self::Item>>( &mut self, iter: I, ) -> PushIterFuture<'_, Self, I> ⓘ
Push items from iterator waiting asynchronously if the buffer is full. Read more
source§fn wait_vacant(&mut self, count: usize) -> WaitVacantFuture<'_, Self> ⓘ
fn wait_vacant(&mut self, count: usize) -> WaitVacantFuture<'_, Self> ⓘ
Wait for the buffer to have at least
count
free places for items or to close. Read morefn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<bool>
source§impl<R: AsyncRbRef> AsyncWrite for AsyncProd<R>where
R::Rb: RingBuffer<Item = u8>,
impl<R: AsyncRbRef> AsyncWrite for AsyncProd<R>where
R::Rb: RingBuffer<Item = u8>,
source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf
into the object. Read moresource§fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more
source§impl<R: AsyncRbRef> Sink<<<R as RbRef>::Rb as Observer>::Item> for AsyncProd<R>
impl<R: AsyncRbRef> Sink<<<R as RbRef>::Rb as Observer>::Item> for AsyncProd<R>
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(
self: Pin<&mut Self>,
item: <R::Rb as Observer>::Item,
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, item: <R::Rb as Observer>::Item, ) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read more