Struct tokio_util::compat::Compat[][src]

pub struct Compat<T> { /* fields omitted */ }

A compatibility layer that allows conversion between the tokio::io and futures-io AsyncRead and AsyncWrite traits.

Implementations

impl<T> Compat<T>[src]

pub fn get_ref(&self) -> &T[src]

Get a reference to the Future, Stream, AsyncRead, or AsyncWrite object contained within.

pub fn get_mut(&mut self) -> &mut T[src]

Get a mutable reference to the Future, Stream, AsyncRead, or AsyncWrite object contained within.

pub fn into_inner(self) -> T[src]

Returns the wrapped item.

Trait Implementations

impl<T> AsyncBufRead for Compat<T> where
    T: AsyncBufRead
[src]

impl<T> AsyncBufRead for Compat<T> where
    T: AsyncBufRead
[src]

impl<T> AsyncRead for Compat<T> where
    T: AsyncRead
[src]

impl<T> AsyncRead for Compat<T> where
    T: AsyncRead
[src]

impl<T> AsyncWrite for Compat<T> where
    T: AsyncWrite
[src]

impl<T> AsyncWrite for Compat<T> where
    T: AsyncWrite
[src]

impl<T: Clone> Clone for Compat<T>[src]

impl<T: Copy> Copy for Compat<T>[src]

impl<T: Debug> Debug for Compat<T>[src]

impl<'__pin, T> Unpin for Compat<T> where
    __Origin<'__pin, T>: Unpin
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Compat<T> where
    T: RefUnwindSafe

impl<T> Send for Compat<T> where
    T: Send

impl<T> Sync for Compat<T> where
    T: Sync

impl<T> UnwindSafe for Compat<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FuturesAsyncReadCompatExt for T where
    T: AsyncRead
[src]

impl<T> FuturesAsyncWriteCompatExt for T where
    T: AsyncWrite
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> Tokio02AsyncReadCompatExt for T where
    T: AsyncRead
[src]

impl<T> Tokio02AsyncWriteCompatExt for T where
    T: AsyncWrite
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.