Struct TokioIo

struct TokioIo<T> { ... }

A wrapper that implements Tokio's IO traits for an inner type that implements hyper's IO traits, or vice versa (implements hyper's IO traits for a type that implements Tokio's IO traits).

Implementations

impl<T> TokioIo<T>

fn new(inner: T) -> Self

Wrap a type implementing Tokio's or hyper's IO traits.

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

Borrow the inner type.

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

Mut borrow the inner type.

fn into_inner(self: Self) -> T

Consume this wrapper and get the inner type.

impl<'__pin, T> Unpin for TokioIo<T>

impl<R> AsyncReadExt for TokioIo<T>

impl<T> Any for TokioIo<T>

fn type_id(self: &Self) -> TypeId

impl<T> AsyncRead for TokioIo<T>

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

impl<T> AsyncWrite for TokioIo<T>

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<T> Borrow for TokioIo<T>

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

impl<T> BorrowMut for TokioIo<T>

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

impl<T> Connection for TokioIo<T>

fn connected(self: &Self) -> Connected

impl<T> Freeze for TokioIo<T>

impl<T> From for TokioIo<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for TokioIo<T>

impl<T> Read for TokioIo<T>

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

impl<T> RefUnwindSafe for TokioIo<T>

impl<T> Send for TokioIo<T>

impl<T> Sync for TokioIo<T>

impl<T> UnsafeUnpin for TokioIo<T>

impl<T> UnwindSafe for TokioIo<T>

impl<T> WithSubscriber for TokioIo<T>

impl<T> Write for TokioIo<T>

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<T, U> Into for TokioIo<T>

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 TokioIo<T>

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

impl<T, U> TryInto for TokioIo<T>

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

impl<T: $crate::fmt::Debug> Debug for TokioIo<T>

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

impl<W> AsyncWriteExt for TokioIo<T>