Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

defaultFlush

Repeatedly calls VTable.drain until end is zero.

Writer.defaultFlush
pub fn defaultFlush(w: *Writer) Error!void

File

lib/std/Io/Writer.zig:317

Code

pub fn defaultFlush(w: *Writer) Error!void {
    const drainFn = w.vtable.drain;
    while (w.end != 0) _ = try drainFn(w, &.{""}, 1);
}