[][src]Function http_req::request::copy_until

pub fn copy_until<R: ?Sized>(
    reader: &mut R,
    val: &[u8],
    deadline: Instant
) -> Result<[Vec<u8>; 2], Error> where
    R: Read

Reads data from reader and checks for specified value. When data contains specified value or deadline is reached, stops reading. Returns read data as array of two vectors: elements before and after the val.