Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Private Struct

Adapter

Private Struct
std.zig.llvm.Builder.Metadata.String.Adapter
const Adapter = struct

Fields

builder: *const Builder

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));
            }
        }