Rust's futures are super complex and super confusing :(.
Looking at futures::io::ReadExact source code and I wonder, is it always true that
AsyncRead will populate the expected buffer in full?
To be more clear, let say I read TcpStream. I expect buffer
let mut but = vec![0u8; 6] and the peer is receiving the stream in delayed chunks like this:
123 ___ 4___56___789
Will the result of
Pin::new(&mut this.reader).poll_read(cx, &mut buf) always return
buf= or buf=[1,2,3,4,5,6], or is there another case where the buffer will not be field in full and I should raise an error (e.g. buf=[1,2,3,4,0,0,0])?