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.
pubconstSetSockOptError = error{
/// The socket is already connected, and a specified option cannot be set while the socket is connected.AlreadyConnected,
/// The option is not supported by the protocol.InvalidProtocolOption,
/// The send and receive timeout values are too big to fit into the timeout fields in the socket structure.TimeoutTooBig,
/// Insufficient resources are available in the system to complete the call.SystemResources,
/// Setting the socket option requires more elevated permissions.PermissionDenied,
OperationUnsupported,
NetworkDown,
FileDescriptorNotASocket,
SocketNotBound,
NoDevice,
} || UnexpectedError