Function hash [src]
Prototype
pub fn hash(self: TableAdapter, a: Cache.Path) u32
Parameters
self: TableAdapter
a: Cache.Path
Source
pub fn hash(self: TableAdapter, a: Cache.Path) u32 {
_ = self;
const seed = switch (@typeInfo(@TypeOf(a.root_dir.handle.fd))) {
.pointer => @intFromPtr(a.root_dir.handle.fd),
.int => @as(u32, @bitCast(a.root_dir.handle.fd)),
else => @compileError("unimplemented hash function"),
};
return @truncate(Hash.hash(seed, a.sub_path));
}