pub fn read_record_stream<R: AsyncRead + Unpin>(
lace: &LaceHandle,
reader: R,
max_bytes: u64,
) -> Result<RecordStream<R>>Expand description
Read the records of a record stream from reader, one at a time.
Each record is validated as it arrives and received like an ILTP
response: into lace’s record staging, written on the blocking pool, or
into memory when its store has none. A record whose canonical length
exceeds what remains of max_bytes fails at its start, before any of its
bytes are held. An invalid, oversized or truncated record, or a failed
read, ends the stream with one error and discards its partial bytes. The
reader’s chunk buffer is reserved from the IO budget until the stream
drops.