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 › array_hash_map › ArrayHashMap › fetchRemoveByKeyGeneric Private Function fetchRemoveByKeyGeneric Doc Source Private Function std.array_hash_map.ArrayHashMap.fetchRemoveByKeyGeneric
fn fetchRemoveByKeyGeneric (
self : *Self ,
key : anytype ,
key_ctx : anytype ,
ctx : ByIndexContext ,
header : *IndexHeader ,
comptime I : type ,
comptime removal_type : RemovalType ,
) ?KV Params File array_hash_map.zig: 1094
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112 fn fetchRemoveByKeyGeneric (
self : *Self ,
key : anytype ,
key_ctx : anytype ,
ctx : ByIndexContext ,
header : *IndexHeader ,
comptime I : type ,
comptime removal_type : RemovalType ,
) ?KV {
const indexes = header .indexes (I );
const entry_index = self .removeFromIndexByKey (key , key_ctx , header , I , indexes ) orelse return null ;
const slice = self .entries .slice ();
const removed_entry : KV = .{
.key = slice .items (.key )[entry_index ],
.value = slice .items (.value )[entry_index ],
};
self .removeFromArrayAndUpdateIndex (entry_index , ctx , header , I , indexes , removal_type );
return removed_entry ;
}