Struct futures_lite::io::Sink
source · [−]pub struct Sink { /* private fields */ }
Expand description
Writer for the sink()
function.
Trait Implementations
sourceimpl AsyncWrite for Sink
impl AsyncWrite for Sink
sourcefn poll_write(
self: Pin<&mut Self>,
_: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_write(
self: Pin<&mut Self>,
_: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
Attempt to write bytes from buf
into the object. Read more
sourcefn poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<()>>
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
Auto Trait Implementations
impl RefUnwindSafe for Sink
impl Send for Sink
impl Sync for Sink
impl Unpin for Sink
impl UnwindSafe for Sink
Blanket Implementations
sourceimpl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
sourcefn write<'a>(&'a mut self, buf: &'a [u8]) -> WriteFuture<'a, Self>ⓘNotable traits for WriteFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for WriteFuture<'_, W> type Output = Result<usize>;
where
Self: Unpin,
fn write<'a>(&'a mut self, buf: &'a [u8]) -> WriteFuture<'a, Self>ⓘNotable traits for WriteFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for WriteFuture<'_, W> type Output = Result<usize>;
where
Self: Unpin,
Writes some bytes into the byte stream. Read more
sourcefn write_vectored<'a>(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self>ⓘNotable traits for WriteVectoredFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for WriteVectoredFuture<'_, W> type Output = Result<usize>;
where
Self: Unpin,
fn write_vectored<'a>(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self>ⓘNotable traits for WriteVectoredFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for WriteVectoredFuture<'_, W> type Output = Result<usize>;
where
Self: Unpin,
sourcefn write_all<'a>(&'a mut self, buf: &'a [u8]) -> WriteAllFuture<'a, Self>ⓘNotable traits for WriteAllFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for WriteAllFuture<'_, W> type Output = Result<()>;
where
Self: Unpin,
fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> WriteAllFuture<'a, Self>ⓘNotable traits for WriteAllFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for WriteAllFuture<'_, W> type Output = Result<()>;
where
Self: Unpin,
Writes an entire buffer into the byte stream. Read more
sourcefn flush(&mut self) -> FlushFuture<'_, Self>ⓘNotable traits for FlushFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for FlushFuture<'_, W> type Output = Result<()>;
where
Self: Unpin,
fn flush(&mut self) -> FlushFuture<'_, Self>ⓘNotable traits for FlushFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for FlushFuture<'_, W> type Output = Result<()>;
where
Self: Unpin,
Flushes the stream to ensure that all buffered contents reach their destination. Read more
sourcefn close(&mut self) -> CloseFuture<'_, Self>ⓘNotable traits for CloseFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for CloseFuture<'_, W> type Output = Result<()>;
where
Self: Unpin,
fn close(&mut self) -> CloseFuture<'_, Self>ⓘNotable traits for CloseFuture<'_, W>impl<W: AsyncWrite + Unpin + ?Sized> Future for CloseFuture<'_, W> type Output = Result<()>;
where
Self: Unpin,
Closes the writer. Read more
sourcefn boxed_writer<'a>(self) -> Pin<Box<dyn AsyncWrite + Send + 'a>> where
Self: Sized + Send + 'a,
fn boxed_writer<'a>(self) -> Pin<Box<dyn AsyncWrite + Send + 'a>> where
Self: Sized + Send + 'a,
Boxes the writer and changes its type to dyn AsyncWrite + Send + 'a
. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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