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.
pubconstPROT = struct {
/// [MC2] no permissionspubconstNONE: vm_prot_t = 0x00;
/// [MC2] pages can be readpubconstREAD: vm_prot_t = 0x01;
/// [MC2] pages can be writtenpubconstWRITE: vm_prot_t = 0x02;
/// [MC2] pages can be executedpubconstEXEC: vm_prot_t = 0x04;
/// When a caller finds that they cannot obtain write permission on a/// mapped entry, the following flag can be used. The entry will be/// made "needs copy" effectively copying the object (using COW),/// and write permission will be added to the maximum protections for/// the associated entry.pubconstCOPY: vm_prot_t = 0x10;
}