pub struct Smol<T>(pub T);Available on crate feature
smol only.Expand description
Wrapper IO type for smol::io::AsyncRead and smol::io::AsyncWrite.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T> AsyncWrite for Smol<T>where
T: AsyncWrite,
impl<T> AsyncWrite for Smol<T>where
T: AsyncWrite,
Source§impl<T> Container for Smol<T>
impl<T> Container for Smol<T>
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Construct a
Self from the inner type.Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Destruct the container into its inner type.
Source§impl<T> IntoWrite<Smol<T>> for Twhere
T: AsyncWrite,
impl<T> IntoWrite<Smol<T>> for Twhere
T: AsyncWrite,
Source§fn into_write(self) -> Smol<T>
fn into_write(self) -> Smol<T>
Convert
self to a writer T.impl<'pin, T> Unpin for Smol<T>where
PinnedFieldsOf<__Smol<'pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for Smol<T>where
T: Freeze,
impl<T> RefUnwindSafe for Smol<T>where
T: RefUnwindSafe,
impl<T> Send for Smol<T>where
T: Send,
impl<T> Sync for Smol<T>where
T: Sync,
impl<T> UnwindSafe for Smol<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsyncReadExt for T
impl<T> AsyncReadExt for T
Source§fn poll_read_buf<B>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B,
) -> Poll<Result<(), Self::Error>>
fn poll_read_buf<B>( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut B, ) -> Poll<Result<(), Self::Error>>
Poll the reader and try to read some bytes into
buf.Source§fn poll_read_buf_all<B>(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut B,
) -> Poll<Result<(), Self::Error>>
fn poll_read_buf_all<B>( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut B, ) -> Poll<Result<(), Self::Error>>
Poll the reader and try to read some bytes into
buf.Source§fn read_buf<B>(&mut self, buf: B) -> ReadBuf<'_, Self, B>
fn read_buf<B>(&mut self, buf: B) -> ReadBuf<'_, Self, B>
Asynchronously read some bytes into
buf advancing it appropriately. Read moreSource§fn read_buf_all<B>(&mut self, buf: B) -> ReadBufAll<'_, Self, B>
fn read_buf_all<B>(&mut self, buf: B) -> ReadBufAll<'_, Self, B>
Asynchronously read bytes into
buf advancing it until it is full. Read moreSource§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> IntoRead<NativeAsync<T>> for Twhere
T: AsyncRead,
impl<T> IntoRead<NativeAsync<T>> for Twhere
T: AsyncRead,
Source§fn into_read(self) -> NativeAsync<T>
fn into_read(self) -> NativeAsync<T>
Convert
self to a reader 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.