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.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:896
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).?);
        }
    }