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
sourceimpl<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
sourceimpl<T: AsyncRead + Unpin + ?Sized> Read for FromTokio<T>
impl<T: AsyncRead + Unpin + ?Sized> Read for FromTokio<T>
type ReadFuture<'a>
where
Self: 'a = impl Future<Output = Result<usize, <FromTokio<T> as Io>::Error>>
type ReadFuture<'a>
where
Self: 'a = impl Future<Output = Result<usize, <FromTokio<T> as Io>::Error>>
Available on crate feature
async
only.Future returned by read
.
sourcefn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a>
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a>
Available on crate feature
async
only.Pull some bytes from this source into the specified buffer, returning how many bytes were read.
sourcefn read_exact<'a>(
&'a mut self,
buf: &'a mut [u8]
) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>>
fn read_exact<'a>(
&'a mut self,
buf: &'a mut [u8]
) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>>
Available on crate feature
async
only.Read the exact number of bytes required to fill buf
.
sourceimpl<T: AsyncWrite + Unpin + ?Sized> Write for FromTokio<T>
impl<T: AsyncWrite + Unpin + ?Sized> Write for FromTokio<T>
type WriteFuture<'a>
where
Self: 'a = impl Future<Output = Result<usize, <FromTokio<T> as Io>::Error>>
type WriteFuture<'a>
where
Self: 'a = impl Future<Output = Result<usize, <FromTokio<T> as Io>::Error>>
Available on crate feature
async
only.Future returned by write
.
type FlushFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <FromTokio<T> as Io>::Error>>
type FlushFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <FromTokio<T> as Io>::Error>>
Available on crate feature
async
only.Future returned by flush
.
sourcefn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a>
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a>
Available on crate feature
async
only.Write a buffer into this writer, returning how many bytes were written.
sourcefn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>
Available on crate feature
async
only.Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for FromTokio<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Send for FromTokio<T> where
T: Send,
impl<T: ?Sized> Sync for FromTokio<T> where
T: Sync,
impl<T: ?Sized> Unpin for FromTokio<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for FromTokio<T> where
T: UnwindSafe,
Blanket Implementations
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