Struct embedded_io::adapters::FromTokio
source · pub struct FromTokio<T: ?Sized> { /* private fields */ }Available on crate feature
tokio only.Expand description
Adapter from tokio::io traits.
Implementations§
source§impl<T> FromTokio<T>
impl<T> FromTokio<T>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consume the adapter, returning the inner object.
Trait Implementations§
source§impl<T: AsyncRead + Unpin + ?Sized> Read for FromTokio<T>
impl<T: AsyncRead + Unpin + ?Sized> Read for FromTokio<T>
source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Available on crate feature
async only.Pull some bytes from this source into the specified buffer, returning how many bytes were read.
source§async fn read_exact(
&mut self,
buf: &mut [u8]
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact(
&mut self,
buf: &mut [u8]
) -> Result<(), ReadExactError<Self::Error>>
Available on crate feature
async only.Read the exact number of bytes required to fill
buf.source§impl<T: AsyncSeek + Unpin + ?Sized> Seek for FromTokio<T>
impl<T: AsyncSeek + Unpin + ?Sized> Seek for FromTokio<T>
source§impl<T: AsyncWrite + Unpin + ?Sized> Write for FromTokio<T>
impl<T: AsyncWrite + Unpin + ?Sized> Write for FromTokio<T>
source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Available on crate feature
async only.Write a buffer into this writer, returning how many bytes were written.