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.
pubconstReadPositionalError = error{
InputOutput,
SystemResources,
/// Trying to read a directory file descriptor as if it were a file.IsDir,
/// Non-blocking has been enabled, and reading from the file descriptor/// would block.WouldBlock,
/// In WASI, this error occurs when the file descriptor does/// not hold the required rights to read from it.AccessDenied,
/// Unable to read file due to lock. Depending on the `Io` implementation,/// reading from a locked file may return this error, or may ignore the/// lock.LockViolation,
/// This file cannot be read positionally.Unseekable,
/// File was not opened with read capability.NotOpenForReading,
} || Io.Cancelable || Io.UnexpectedError