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.

workerRun

Fetch.workerRun
pub fn workerRun(f: *Fetch, prog_name: []const u8) Io.Cancelable!void

File

lib/compiler/Maker/Fetch.zig:1043

Code

pub fn workerRun(f: *Fetch, prog_name: []const u8) Io.Cancelable!void {
    const prog_node = f.prog_node.start(prog_name, 0);
    defer prog_node.end();

    run(f) catch |err| switch (err) {
        error.OutOfMemory => f.oom_flag = true,
        error.Canceled => |e| return e,
        error.FetchFailed => {
            // Nothing to do because the errors are already reported in `error_bundle`,
            // and a reference is kept to the `Fetch` task inside `all_fetches`.
        },
    };
}