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.
Zig › std/ › Build/ › Configuration.zig › InstallDestDir
InstallDestDir
Configuration.InstallDestDir
pub const InstallDestDir = enum (u32 )
File
Code
pub const InstallDestDir = enum (u32 ) {
none = max_u32 - 4 ,
prefix = max_u32 - 3 ,
lib = max_u32 - 2 ,
bin = max_u32 - 1 ,
header = max_u32 ,
_ ,
pub fn initCustom (sub_path : String ) InstallDestDir {
assert (@backingInt (sub_path ) < @backingInt (InstallDestDir .none ));
return @fromBackingInt (@intCast (@backingInt (sub_path )));
}
pub const Unpacked = union (enum ) {
prefix ,
lib ,
bin ,
header ,
sub_path : String ,
};
pub fn unpack (this : @This ()) ?Unpacked {
return switch (this ) {
.none => null ,
.prefix => .prefix ,
.lib => .lib ,
.bin => .bin ,
.header => .header ,
_ => .{ .sub_path = @fromBackingInt (@intCast (@backingInt (this ))) },
};
}
}