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 library itself.
Zig › compiler/ › translate-c/ › Translator.zig › AnonymousRecordFieldNames
AnonymousRecordFieldNames
Translator.AnonymousRecordFieldNames
const AnonymousRecordFieldNames = struct
File
Code
const AnonymousRecordFieldNames = struct {
pub const Key = struct {
parent : QualType ,
field : QualType ,
};
pub const Context = struct {
pub fn hash (ctx : Context , key : Key ) u64 {
const auto_hash = std .hash_map .getAutoHashFn (Key , Context );
return auto_hash (ctx , .{
.parent = key .parent .unqualified (),
.field = key .field .unqualified (),
});
}
pub fn eql (ctx : Context , a : Key , b : Key ) bool {
const auto_eql = std .hash_map .getAutoEqlFn (Key , Context );
return auto_eql (ctx , .{
.parent = a .parent .unqualified (),
.field = a .field .unqualified (),
}, .{
.parent = b .parent .unqualified (),
.field = b .field .unqualified (),
});
}
};
}