[−][src]Struct async_ringbuffer::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.
Methods
impl Writer
[src]
pub fn is_closed(&self) -> bool
[src]
Returns true if the writer has been closed, and will therefore no longer accept writes.
Trait Implementations
impl AsyncWrite for Writer
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize>>
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(self: Pin<&mut Self>, _: &mut Context) -> Poll<Result<()>>
[src]
Errors
This never emits an error.
fn poll_close(self: Pin<&mut Self>, _: &mut Context) -> 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_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
impl Drop for Writer
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Writer
impl !Send for Writer
impl !Sync for Writer
impl Unpin for Writer
impl !UnwindSafe for Writer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,