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 › DataLayout › PrimitiveSpec Private Struct PrimitiveSpec Doc Source Private Struct std.zig.llvm.Builder.DataLayout.PrimitiveSpec
const PrimitiveSpec = packed struct (u32 ) Fields Namespaces Values File zig/llvm/Builder.zig: 391
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409 const PrimitiveSpec = packed struct (u32 ) {
bit_width : BitWidth ,
abi_align : Alignment ,
pref_align : Alignment ,
const BitWidth = u20 ;
const Map = std .array_hash_map .Custom (PrimitiveSpec , void , Context , false );
const Context = struct {
pub fn hash (_ : Context , spec : PrimitiveSpec ) u32 {
return std .hash .int (spec .bit_width );
}
pub fn eql (_ : Context , lhs_spec : PrimitiveSpec , rhs_spec : PrimitiveSpec , _ : usize ) bool {
return lhs_spec .bit_width == rhs_spec .bit_width ;
}
};
}