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.
pubconstLevel = enum {
/// Error: something has gone wrong. This might be recoverable or might/// be followed by the program exiting.err,
/// Warning: it is uncertain if something has gone wrong or not, but the/// circumstances would be worth investigating.warn,
/// Info: general messages about the state of the program.info,
/// Debug: messages only useful for debugging.debug,
/// Returns a string literal of the given level in full text form.pubfnasText(comptimeself: Level) []constu8 {
returnswitch (self) {
.err => "error",
.warn => "warning",
.info => "info",
.debug => "debug",
};
}
}