pub fn copy_with_timeout<R, W>(
reader: &mut R,
writer: &mut W,
deadline: Instant,
) -> Result<u64>Expand description
Copies data from reader to writer until the deadline is reached.
Limitations of current implementation may cause exceeding the deadline.
Returns how many bytes has been read.