Function writableArray [src]

Asserts the provided buffer has total capacity enough for len. Advances the buffer end position by len.

Prototype

pub fn writableArray(w: *Writer, comptime len: usize) Error!*[len]u8

Parameters

w: *Writerlen: usize

Possible Errors

WriteFailed

See the Writer implementation for detailed diagnostics.

Source

pub fn writableArray(w: *Writer, comptime len: usize) Error!*[len]u8 { const big_slice = try w.writableSliceGreedy(len); advance(w, len); return big_slice[0..len]; }