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>

source§

fn register_waker(&self, waker: &Waker)

source§

fn close(&mut self)

source§

fn is_closed(&self) -> bool

Whether the corresponding consumer was closed.
source§

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>

Push items from iterator waiting asynchronously if the buffer is full. Read more
source§

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 more
source§

fn 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>,

source§

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 more
source§

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§

fn poll_close(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>

Attempt to close the object. Read more
§

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

Attempt to write bytes from bufs into the object using vectored IO operations. Read more
source§

impl<R: AsyncRbRef> Sink<<<R as RbRef>::Rb as Observer>::Item> for AsyncProd<R>

§

type Error = ()

The type of value produced by the sink when an error occurs.
source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
source§

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
source§

fn poll_flush( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
source§

fn poll_close( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
source§

impl<R: AsyncRbRef> DelegateProducer for AsyncProd<R>