[][src]Struct fixed_buffer_tokio::AsyncReadWriteChain

pub struct AsyncReadWriteChain<'a, R: AsyncRead + Send + Unpin, RW: AsyncRead + AsyncWrite + Send + Unpin> { /* fields omitted */ }

A wrapper for a pair of structs. The first implements AsyncRead. The second implements AsyncRead+AsyncWrite.

Passes reads through to the AsyncRead. Once the AsyncRead returns EOF, passes reads to AsyncRead+AsyncWrite.

Passes all writes through to the AsyncRead+AsyncWrite.

This is like tokio::io::AsyncReadExt::chain that passes through writes. This makes it usable with AsyncRead+AsyncWrite objects like tokio::net::TcpStream and tokio_rustls::server::TlsStream.

Implementations

impl<'a, R: AsyncRead + Send + Unpin, RW: AsyncRead + AsyncWrite + Send + Unpin> AsyncReadWriteChain<'a, R, RW>[src]

pub fn new(
    reader: &'a mut R,
    read_writer: &'a mut RW
) -> AsyncReadWriteChain<'a, R, RW>
[src]

Trait Implementations

impl<'a, R: AsyncRead + Send + Unpin, RW: AsyncRead + AsyncWrite + Send + Unpin> AsyncRead for AsyncReadWriteChain<'a, R, RW>[src]

impl<'a, R: AsyncRead + Send + Unpin, RW: AsyncRead + AsyncWrite + Send + Unpin> AsyncWrite for AsyncReadWriteChain<'a, R, RW>[src]

Auto Trait Implementations

impl<'a, R, RW> RefUnwindSafe for AsyncReadWriteChain<'a, R, RW> where
    R: RefUnwindSafe,
    RW: RefUnwindSafe

impl<'a, R, RW> Send for AsyncReadWriteChain<'a, R, RW>

impl<'a, R, RW> Sync for AsyncReadWriteChain<'a, R, RW> where
    R: Sync,
    RW: Sync

impl<'a, R, RW> Unpin for AsyncReadWriteChain<'a, R, RW>

impl<'a, R, RW> !UnwindSafe for AsyncReadWriteChain<'a, R, RW>

Blanket Implementations

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

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?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, U> Into<U> for T where
    U: From<T>, 
[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.