Struct WithTokioIo

struct WithTokioIo<I> { ... }

Extends an underlying hyper I/O with tokio I/O implementations.

This implements AsyncRead and AsyncWrite given an inner type that implements Read and Write, respectively.

Implementations

impl<I> WithTokioIo<I>

fn new(inner: I) -> Self

Wraps the inner I/O in an [WithTokioIo<I>]

fn inner(self: &Self) -> &I

Returns a reference to the inner type.

fn inner_mut(self: &mut Self) -> &mut I

Returns a mutable reference to the inner type.

fn into_inner(self: Self) -> I

Consumes this wrapper and returns the inner type.

impl<'__pin, I> Unpin for WithTokioIo<I>

impl<I> AsyncRead for WithTokioIo<I>

fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, tbuf: &mut ReadBuf<'_>) -> Poll<Result<(), Error>>

impl<I> AsyncWrite for WithTokioIo<I>

fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize, Error>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn is_write_vectored(self: &Self) -> bool
fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>]) -> Poll<Result<usize, Error>>

impl<I> Freeze for WithTokioIo<I>

impl<I> Read for WithTokioIo<I>

fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: ReadBufCursor<'_>) -> Poll<Result<(), Error>>

impl<I> RefUnwindSafe for WithTokioIo<I>

impl<I> Send for WithTokioIo<I>

impl<I> Sync for WithTokioIo<I>

impl<I> UnsafeUnpin for WithTokioIo<I>

impl<I> UnwindSafe for WithTokioIo<I>

impl<I> Write for WithTokioIo<I>

fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize, Error>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn is_write_vectored(self: &Self) -> bool
fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>]) -> Poll<Result<usize, Error>>

impl<I: $crate::fmt::Debug> Debug for WithTokioIo<I>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<R> AsyncReadExt for WithTokioIo<I>

impl<T> Any for WithTokioIo<I>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for WithTokioIo<I>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for WithTokioIo<I>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for WithTokioIo<I>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for WithTokioIo<I>

impl<T> WithSubscriber for WithTokioIo<I>

impl<T, U> Into for WithTokioIo<I>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for WithTokioIo<I>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for WithTokioIo<I>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<W> AsyncWriteExt for WithTokioIo<I>