const Adapter = struct
builder: *const Builder
pub fn hash(_: Adapter, key: []const u8) u32
pub fn eql(ctx: Adapter, lhs_key: []const u8, _: void, rhs_index: usize) bool
896 897 898 899 900 901 902 903 904
const Adapter = struct { builder: *const Builder, pub fn hash(_: Adapter, key: []const u8) u32 { return @truncate(std.hash.Wyhash.hash(0, key)); } pub fn eql(ctx: Adapter, lhs_key: []const u8, _: void, rhs_index: usize) bool { return std.mem.eql(u8, lhs_key, String.fromIndex(rhs_index).slice(ctx.builder).?); } }