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.
pubconstMSG = struct {
/// process out-of-band datapubconstOOB = 0x1;
/// peek at incoming messagepubconstPEEK = 0x2;
/// send without using routing tablespubconstDONTROUTE = 0x4;
/// data completes recordpubconstEOR = 0x8;
/// data discarded before deliverypubconstTRUNC = 0x10;
/// control data lost before deliverypubconstCTRUNC = 0x20;
/// wait for full request or errorpubconstWAITALL = 0x40;
/// this message should be nonblockingpubconstDONTWAIT = 0x80;
/// data completes connectionpubconstEOF = 0x100;
/// wait up to full request, may return partialpubconstWAITSTREAM = 0x200;
/// Start of 'hold' seq; dump so_temp, deprecatedpubconstFLUSH = 0x400;
/// Hold frag in so_temp, deprecatedpubconstHOLD = 0x800;
/// Send the packet in so_temp, deprecatedpubconstSEND = 0x1000;
/// Data ready to be readpubconstHAVEMORE = 0x2000;
/// Data remains in current pktpubconstRCVMORE = 0x4000;
/// Fail receive if socket address cannot be allocatedpubconstNEEDSA = 0x10000;
/// do not generate SIGPIPE on EOFpubconstNOSIGNAL = 0x80000;
/// Inherit upcall in sock_acceptpubconstUSEUPCALL = 0x80000000;
}