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.

printStruct

ScannedConfig.printStruct
fn printStruct(sc: *const ScannedConfig, s: *Serializer.Struct, comptime S: type, v: S) !void

File

lib/compiler/Maker/ScannedConfig.zig:51

Code

fn printStruct(sc: *const ScannedConfig, s: *Serializer.Struct, comptime S: type, v: S) !void {
    const info = @typeInfo(S).@"struct";
    inline for (info.field_names, info.field_types) |field_name, field_type| {
        try s.fieldPrefix(field_name);
        try printValue(sc, s.container.serializer, field_type, @field(v, field_name));
    }
}