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.
pubconstStat = externstruct {
/// The inode's device.dev: dev_t,
/// The inode's number.ino: ino_t,
/// Number of hard links.nlink: nlink_t,
/// Inode protection mode.mode: mode_t,
__pad0: i16,
/// User ID of the file's owner.uid: uid_t,
/// Group ID of the file's group.gid: gid_t,
__pad1: i32,
/// Device type.rdev: dev_t,
/// Time of last access.atim: timespec,
/// Time of last data modification.mtim: timespec,
/// Time of last file status change.ctim: timespec,
/// Time of file creation.birthtim: timespec,
/// File size, in bytes.size: off_t,
/// Blocks allocated for file.blocks: blkcnt_t,
/// Optimal blocksize for I/O.blksize: blksize_t,
/// User defined flags for file.flags: fflags_t,
/// File generation number.gen: u64,
__spare: [10]u64,
pubfnatime(self: @This()) timespec {
returnself.atim;
}
pubfnmtime(self: @This()) timespec {
returnself.mtim;
}
pubfnctime(self: @This()) timespec {
returnself.ctim;
}
pubfnbirthtime(self: @This()) timespec {
returnself.birthtim;
}
}