Function writeAll [src]

Calls drain as many times as necessary such that all of bytes are transferred.

Prototype

pub fn writeAll(w: *Writer, bytes: []const u8) Error!void

Parameters

w: *Writerbytes: []const u8

Possible Errors

WriteFailed

See the Writer implementation for detailed diagnostics.

Source

pub fn writeAll(w: *Writer, bytes: []const u8) Error!void { var index: usize = 0; while (index < bytes.len) index += try w.write(bytes[index..]); }