fn chain<R>(self, next: R) -> Chain<Self, R>
    where
        Self: Sized,
        R: AsyncRead,
    {
        assert_read(Chain::new(self, next))
    }
/// Creates an adaptor which will chain this stream with another.
///
/// The returned `AsyncRead` instance will first read all bytes from this object
/// until EOF is encountered. Afterwards the output is equivalent to the
/// output of `next`.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::io::{AsyncReadExt, Cursor};
///
/// let reader1 = Cursor::new([1, 2, 3, 4]);
/// let reader2 = Cursor::new([5, 6, 7, 8]);
///
/// let mut reader = reader1.chain(reader2);
/// let mut buffer = Vec::new();
///
/// // read the value into a Vec.
/// reader.read_to_end(&mut buffer).await?;
/// assert_eq!(buffer, [1, 2, 3, 4, 5, 6, 7, 8]);
/// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
/// ```
Creates an adaptor which will chain this stream with another.
The returned `AsyncRead` instance will first read all bytes from this object
until EOF is encountered. Afterwards the output is equivalent to the
output of `next`.
Creates an adaptor which will chain this stream with another . The returned ` AsyncRead ` instance will first read all bytes from this object until EOF is encountered . Afterwards the output is equivalent to the output of ` next ` .
fn chain<R>(self, next: R) -> Chain<Self, R>
    where
        Self: Sized,
        R: AsyncRead,
    {
        assert_read(Chain::new(self, next))
    }
fn chain < R > ( self , next : R ) -> Chain < Self , R > where Self : Sized , R : AsyncRead , { assert_read ( Chain :: new ( self , next ) ) }
Creates an adaptor which will chain this stream with another.
Creates an adaptor which will chain this stream with another .
self
next
R
self
next
R
examples
None
futures::executor::block_on(async {
use futures::io::{AsyncReadExt, Cursor}.



let mut reader = reader1.chain(reader2);
let mut buffer = Vec::new().

read the value into a Vec.
use futures :: io :: { AsyncReadExt Cursor } . let mut reader = reader1 . chain ( reader2 ) ; let mut buffer = Vec :: new () . read the value into a Vec .
ok::<(), box<dyn std::error::error>>(()) }).unwrap();
None