Zig 0.17.0-dev (Split by item)

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.

HashedFile

Fetch.HashedFile
const HashedFile = struct

File

lib/compiler/Maker/Fetch.zig:1955

Code

const HashedFile = struct {
    fs_path: []const u8,
    normalized_path: []const u8,
    hash: Package.Hash.Digest,
    failure: Error!void,
    kind: Kind,
    size: u64,

    const Error =
        Io.File.OpenError ||
        Io.File.ReadPositionalError ||
        Io.File.StatError ||
        Io.File.SetPermissionsError ||
        Io.Dir.ReadLinkError;

    const Kind = enum { file, link };

    fn lessThan(context: void, lhs: *const HashedFile, rhs: *const HashedFile) bool {
        _ = context;
        return std.mem.lessThan(u8, lhs.normalized_path, rhs.normalized_path);
    }
}