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.

initCopyList

Serialize.initCopyList
fn initCopyList(s: *Serialize, list: []const Step.WriteFile.Copy) ![]const Configuration.Step.WriteFile.Copy

File

lib/std/Build/Serialize.zig:1051

Code

fn initCopyList(s: *Serialize, list: []const Step.WriteFile.Copy) ![]const Configuration.Step.WriteFile.Copy {
    const result = try s.arena.alloc(Configuration.Step.WriteFile.Copy, list.len);
    for (result, list) |*dest, src| dest.* = .{
        .sub_path = src.sub_path,
        .src_file = try s.addLazyPath(src.src_file),
    };
    return result;
}