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.

IdentificationBlock

Identification block contains a string that describes the producer details, and an epoch that defines the auto-upgrade capability.

ir.IdentificationBlock
pub const IdentificationBlock = struct

File

Code

pub const IdentificationBlock = struct {
    pub const id: BlockId = .IDENTIFICATION;

    pub const abbrevs = [_]type{
        IdentificationBlock.Version,
        IdentificationBlock.Epoch,
    };

    pub const Code = enum(u2) {
        /// IDENTIFICATION:      [strchr x N]
        STRING = 1,
        /// EPOCH:               [epoch#]
        EPOCH = 2,
    };

    pub const Version = struct {
        pub const ops = [_]AbbrevOp{
            .{ .literal = @backingInt(IdentificationBlock.Code.STRING) },
            .{ .array_fixed = 8 },
        };
        string: []const u8,
    };

    pub const Epoch = struct {
        pub const ops = [_]AbbrevOp{
            .{ .literal = @backingInt(IdentificationBlock.Code.EPOCH) },
            .{ .vbr = 6 },
        };
        epoch: u32,
    };
}