Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Enum

InstallDestDir

Public Enum
std.Build.Configuration.InstallDestDir
pub const InstallDestDir = enum(u32)

Types

Functions

pub fn initCustom(sub_path: String) InstallDestDir
pub fn unpack(this: @This()) ?Unpacked

File

Build/Configuration.zig:1883
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
pub const InstallDestDir = enum(u32) {
    none = max_u32 - 4,
    prefix = max_u32 - 3,
    lib = max_u32 - 2,
    bin = max_u32 - 1,
    header = max_u32,
    /// A `String` path relative to the prefix.
    _,

    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))) },
        };
    }
}