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.

addInstallDir

Serialize.addInstallDir
fn addInstallDir(wc: *Configuration.Wip, install_dir: ?std.Build.InstallDir) !Configuration.InstallDestDir

File

lib/std/Build/Serialize.zig:1244

Code

fn addInstallDir(wc: *Configuration.Wip, install_dir: ?std.Build.InstallDir) !Configuration.InstallDestDir {
    switch (install_dir orelse return .none) {
        .prefix => return .prefix,
        .lib => return .lib,
        .bin => return .bin,
        .header => return .header,
        .custom => |sub_path| return .initCustom(try wc.addString(sub_path)),
    }
}