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.

DATA

elf.DATA
pub const DATA = enum(u8)

File

lib/std/elf.zig:1672

Code

pub const DATA = enum(u8) {
    NONE = 0,
    @"2LSB" = 1,
    @"2MSB" = 2,
    _,

    pub const NUM = @typeInfo(DATA).@"enum".field_names.len;

    pub inline fn endian(data: DATA) std.lang.Endian {
        return switch (data) {
            .NONE, _ => unreachable,
            .@"2LSB" => .little,
            .@"2MSB" => .big,
        };
    }
}