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.
pubconstIncomingMessage = struct {
/// Populated by receive functions.from: IpAddress,
/// Populated by receive functions, points into the caller-supplied buffer.data: []u8,
/// Supplied by caller before calling receive functions; mutated by receive/// functions.control: []u8,
/// Populated by receive functions.flags: Flags,
/// Useful for initializing before calling `receiveManyTimeout`.pubconstinit: IncomingMessage = .{
.from = undefined,
.data = undefined,
.control = &.{},
.flags = undefined,
};
pubconstFlags = packedstruct(u8) {
/// indicates end-of-record; the data returned completed a record/// (generally used with sockets of type SOCK_SEQPACKET).eor: bool,
/// indicates that the trailing portion of a datagram was discarded/// because the datagram was larger than the buffer supplied.trunc: bool,
/// indicates that some control data was discarded due to lack of/// space in the buffer for ancilā lary data.ctrunc: bool,
/// indicates expedited or out-of-band data was received.oob: bool,
/// indicates that no data was received but an extended error from the/// socket error queue.errqueue: bool,
_: u3 = 0,
};
}