[][src]Struct async_ringbuffer::Writer

pub struct Writer(_);

Write access to a nonblocking ring buffer with fixed capacity.

If there is no space in the buffer to write to, the current task is parked and notified once space becomes available.

Trait Implementations

impl Drop for Writer[src]

impl AsyncWrite for Writer[src]

fn poll_write(&mut self, wk: &Waker, buf: &[u8]) -> Poll<Result<usize>>[src]

Write data to the RingBuffer.

This only returns Ok(Ready(0)) if either buf.len() == 0, poll_close has been called, or if the corresponding Reader has been dropped and no more data will be read to free up space for new data.

Errors

This never emits an error.

fn poll_flush(&mut self, _: &Waker) -> Poll<Result<()>>[src]

Errors

This never emits an error.

fn poll_close(&mut self, _: &Waker) -> Poll<Result<()>>[src]

Once closing is complete, the corresponding reader will always return Ok(Ready(0)) on poll_read once all remaining buffered data has been read.

Errors

This never emits an error.

fn poll_vectored_write(
    &mut self,
    waker: &Waker,
    vec: &[&IoVec]
) -> Poll<Result<usize, Error>>
[src]

Attempt to write bytes from vec into the object using vectored IO operations. Read more

Auto Trait Implementations

impl !Send for Writer

impl !Sync for Writer

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]