Function http_req::request::copy_with_timeout

source ·
pub fn copy_with_timeout<R, W>(
    reader: &mut R,
    writer: &mut W,
    deadline: Instant
) -> Result<u64>
where R: Read + ?Sized, W: Write + ?Sized,
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.