pub async fn read_with_timeout(
reader: &mut (impl AsyncRead + Unpin),
timeout: Duration,
) -> Vec<u8> ⓘExpand description
Read all available data from an AsyncRead within a timeout.
Reads chunks until the timeout expires or the remote closes. Returns the accumulated bytes.