pub struct Writer<B> { /* private fields */ }Expand description
An adapter for BufMut that implements both Write and AsyncWrite.
Trait Implementations§
Source§impl<B: BufMut + Unpin> AsyncWrite for Writer<B>
impl<B: BufMut + Unpin> AsyncWrite for Writer<B>
Source§impl<B: BufMut> Write for Writer<B>
impl<B: BufMut> Write for Writer<B>
impl<B: Copy> Copy for Writer<B>
Auto Trait Implementations§
impl<B> Freeze for Writer<B>where
B: Freeze,
impl<B> RefUnwindSafe for Writer<B>where
B: RefUnwindSafe,
impl<B> Send for Writer<B>where
B: Send,
impl<B> Sync for Writer<B>where
B: Sync,
impl<B> Unpin for Writer<B>where
B: Unpin,
impl<B> UnwindSafe for Writer<B>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsyncWriteExt for Twhere
T: AsyncWrite + ?Sized,
impl<T> AsyncWriteExt for Twhere
T: AsyncWrite + ?Sized,
Source§fn poll_write_buf<B>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B,
) -> Poll<Result<(), Self::Error>>
fn poll_write_buf<B>( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut B, ) -> Poll<Result<(), Self::Error>>
Poll the writer and try to write
buf to it.Source§fn poll_write_buf_all<B>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B,
) -> Poll<Result<(), Self::Error>>
fn poll_write_buf_all<B>( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut B, ) -> Poll<Result<(), Self::Error>>
Poll the writer and try to write
buf to it.Source§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Poll the writer and try to flush it.
Source§fn write_buf<B>(&mut self, buf: B) -> WriteBuf<'_, Self, B>
fn write_buf<B>(&mut self, buf: B) -> WriteBuf<'_, Self, B>
Asynchronously write
buf to the writer advancing it appropriately Read moreSource§fn write_buf_all<B>(&mut self, buf: B) -> WriteBufAll<'_, Self, B>
fn write_buf_all<B>(&mut self, buf: B) -> WriteBufAll<'_, Self, B>
Asynchronously write
buf to the writer advancing it until all of it has been written. Read moreSource§fn flush(&mut self) -> Flush<'_, Self>where
Self: Unpin,
fn flush(&mut self) -> Flush<'_, Self>where
Self: Unpin,
Asynchronously flush the writer. Read more
Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Create a “by reference” adapter that takes the current instance of
AsyncWrite
by mutable reference.Source§fn transaction(
self,
kind: WriteTransactionKind<'_>,
) -> WriteTransactionVariant<'_, Self>where
Self: Sized,
fn transaction(
self,
kind: WriteTransactionKind<'_>,
) -> WriteTransactionVariant<'_, Self>where
Self: Sized,
Available on crate feature
alloc only.Create a transaction that uses this instance of
AsyncWrite. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoWrite<Native<T>> for Twhere
T: Write,
impl<T> IntoWrite<Native<T>> for Twhere
T: Write,
Source§fn into_write(self) -> Native<T>
fn into_write(self) -> Native<T>
Convert
self to a writer T.Source§impl<T> IntoWrite<NativeAsync<T>> for Twhere
T: AsyncWrite,
impl<T> IntoWrite<NativeAsync<T>> for Twhere
T: AsyncWrite,
Source§fn into_write(self) -> NativeAsync<T>
fn into_write(self) -> NativeAsync<T>
Convert
self to a writer T.Source§impl<T> WriteExt for T
impl<T> WriteExt for T
Source§fn write_buf<B>(&mut self, buf: B) -> Result<(), Self::Error>where
B: Buf,
fn write_buf<B>(&mut self, buf: B) -> Result<(), Self::Error>where
B: Buf,
Write
buf to the writer advancing it appropriately.Source§fn write_buf_all<B>(&mut self, buf: B) -> Result<(), Self::Error>where
B: Buf,
fn write_buf_all<B>(&mut self, buf: B) -> Result<(), Self::Error>where
B: Buf,
Write
buf to the writer advancing it until all of it has been written. Read moreSource§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this writer ensuring all bytes reach their destination.
Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Create a “by reference” adapter that takes the current instance of
Write
by mutable reference.Source§fn transaction(
self,
kind: WriteTransactionKind<'_>,
) -> WriteTransactionVariant<'_, Self>where
Self: Sized,
fn transaction(
self,
kind: WriteTransactionKind<'_>,
) -> WriteTransactionVariant<'_, Self>where
Self: Sized,
Available on crate feature
alloc only.Create a transaction that uses this writer. Read more