Struct wasm_streams::writable::IntoAsyncWrite
source · [−]pub struct IntoAsyncWrite<'writer> { /* private fields */ }
Expand description
An AsyncWrite
for the into_async_write
method.
This AsyncWrite
holds a writer, and therefore locks the WritableStream
.
When this AsyncWrite
is dropped, it also drops its writer which in turn
releases its lock.
Implementations
Trait Implementations
sourceimpl<'writer> AsyncWrite for IntoAsyncWrite<'writer>
impl<'writer> AsyncWrite for IntoAsyncWrite<'writer>
sourcefn 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 moresourcefn 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
Auto Trait Implementations
impl<'writer> !RefUnwindSafe for IntoAsyncWrite<'writer>
impl<'writer> !Send for IntoAsyncWrite<'writer>
impl<'writer> !Sync for IntoAsyncWrite<'writer>
impl<'writer> Unpin for IntoAsyncWrite<'writer>
impl<'writer> !UnwindSafe for IntoAsyncWrite<'writer>
Blanket Implementations
sourceimpl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite + ?Sized,
sourcefn flush(&mut self) -> Flush<'_, Self>where
Self: Unpin,
fn flush(&mut self) -> Flush<'_, Self>where
Self: Unpin,
Creates a future which will entirely flush this
AsyncWrite
. Read moresourcefn close(&mut self) -> Close<'_, Self>where
Self: Unpin,
fn close(&mut self) -> Close<'_, Self>where
Self: Unpin,
Creates a future which will entirely close this
AsyncWrite
.sourcefn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>where
Self: Unpin,
fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self>where
Self: Unpin,
Creates a future which will write bytes from
buf
into the object. Read moresourcefn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>where
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self>where
Self: Unpin,
Creates a future which will write bytes from
bufs
into the object using vectored
IO operations. Read moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more