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.
constResultInfo = packedstruct {
/// Do we have a known result type?have_type: bool,
/// Do we (potentially) have a result pointer? Note that this pointer's type/// may not be known due to it being an inferred alloc.have_ptr: bool,
constnone: ResultInfo = .{ .have_type = false, .have_ptr = false };
consttyped_ptr: ResultInfo = .{ .have_type = true, .have_ptr = true };
constinferred_ptr: ResultInfo = .{ .have_type = false, .have_ptr = true };
consttype_only: ResultInfo = .{ .have_type = true, .have_ptr = false };
}