Struct async_ringbuffer::Writer [] [src]

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]

[src]

Executes the destructor for this type. Read more

impl Write for Writer
[src]

Nonblocking Write implementation.

[src]

Write data to the RingBuffer. The only error this may return is of kind WouldBlock. When this returns a WouldBlock error, the current task is parked and gets notified once more space becomes available in the buffer.

This returns only returns Ok(0) if either buf.len() == 0, or if the corresponding Reader has been dropped and no more data will be read to free up space for new data. If the Writer task is parked while the Reader is dropped, the task gets notified.

If a previous call to read returned a WouldBlock error, the corresponding Reader is unparked if data was written in this write call.

[src]

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

1.0.0
[src]

Attempts to write an entire buffer into this write. Read more

1.0.0
[src]

Writes a formatted string into this writer, returning any error encountered. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Write. Read more

impl AsyncWrite for Writer
[src]

[src]

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more

[src]

Write a Buf into this value, returning how many bytes were written. Read more