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 standard library.
std › zig › llvm › Builder › Metadata › String › Adapter Private Struct Adapter Doc Source Private Struct std.zig.llvm.Builder.Metadata.String.Adapter
const Adapter = struct Fields Functions pub fn hash (_ : Adapter , key : []const u8 ) u32 pub fn eql (ctx : Adapter , lhs_key : []const u8 , _ : void , rhs_index : usize ) bool File zig/llvm/Builder.zig: 9161
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170 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 {
const rhs_metadata : Metadata .String = @fromBackingInt (@intCast (rhs_index ));
return std .mem .eql (u8 , lhs_key , rhs_metadata .slice (ctx .builder ));
}
}