Function streamExact64 [src]

"Pump" exactly n bytes from the reader to the writer.

Prototype

pub fn streamExact64(r: *Reader, w: *Writer, n: u64) StreamError!void

Parameters

r: *Readerw: *Writern: u64

Possible Errors

EndOfStream

End of stream indicated from the Reader. This error cannot originate from the Writer.

ReadFailed

See the Reader implementation for detailed diagnostics.

WriteFailed

See the Writer implementation for detailed diagnostics.

Source

pub fn streamExact64(r: *Reader, w: *Writer, n: u64) StreamError!void { var remaining = n; while (remaining != 0) remaining -= try r.stream(w, .limited64(remaining)); }