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.
fnBool(comptimeBackingInteger: type) type {
returnenum(Backing) {
/// falseFALSE = 0,
/// true_,
/// This is not the only truthy value, comparisons against this value are always a bug.pubconstTRUE: @This() = @fromBackingInt(@intCast(1));
pubconstBacking = BackingInteger;
pubfntoBool(b: @This()) bool {
returnb != .FALSE;
}
pubfnfromBool(b: bool) @This() {
return@fromBackingInt(@intCast(@intFromBool(b)));
}
};
}