fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
    where
        Self: Unpin,
    {
        assert_future::<Result<usize>, _>(ReadToEnd::new(self, buf))
    }
/// Creates a future which will read all the bytes from this `AsyncRead`.
///
/// On success the total number of bytes read is returned.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::io::{AsyncReadExt, Cursor};
///
/// let mut reader = Cursor::new([1, 2, 3, 4]);
/// let mut output = Vec::with_capacity(4);
///
/// let bytes = reader.read_to_end(&mut output).await?;
///
/// assert_eq!(bytes, 4);
/// assert_eq!(output, vec![1, 2, 3, 4]);
/// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
/// ```
Creates a future which will read all the bytes from this `AsyncRead`.
On success the total number of bytes read is returned.
Creates a future which will read all the bytes from this ` AsyncRead ` . On success the total number of bytes read is returned .
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
    where
        Self: Unpin,
    {
        assert_future::<Result<usize>, _>(ReadToEnd::new(self, buf))
    }
fn read_to_end < ' a > ( & ' a mut self , buf : & ' a mut Vec < u8 > ) -> ReadToEnd < ' a , Self > where Self : Unpin , { assert_future :: < Result < usize > , _ > ( ReadToEnd :: new ( self , buf ) ) }
Creates a future which will read all the bytes from this `AsyncRead`.
Creates a future which will read all the bytes from this ` AsyncRead ` .
&'a mut self
buf
&'a mut Vec<u8>
&'a mut self
buf
&'a mut Vec<u8>
examples
None
futures::executor::block_on(async {
use futures::io::{AsyncReadExt, Cursor}.

let mut reader = Cursor::new([1, 2, 3, 4]);
let mut output = Vec::with_capacity(4).

let bytes = reader.read_to_end(&mut output).await?.


use futures :: io :: { AsyncReadExt Cursor } . let mut reader = Cursor :: new ( [ 1 2 3 4 ] ) ; let mut output = Vec :: with_capacity ( 4 ) . let bytes = reader . read_to_end ( &mut output ) . await? .
ok::<(), box<dyn std::error::error>>(()) }).unwrap();
None