Function http_req::request::copy_until
source · pub fn copy_until<R>(
reader: &mut R,
val: &[u8],
deadline: Instant
) -> Result<[Vec<u8>; 2], Error>
Expand description
Reads data from reader
and checks for specified val
ue. 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
.