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 › Custom › removeByIndex Private Function removeByIndex Doc Source Private Function std.array_hash_map.Custom.removeByIndex
fn removeByIndex (self : *Self , entry_index : usize , ctx : ByIndexContext , comptime removal_type : RemovalType ) void Params File array_hash_map.zig: 1152
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166 fn removeByIndex (self : *Self , entry_index : usize , ctx : ByIndexContext , comptime removal_type : RemovalType ) void {
assert (entry_index < self .entries .len );
const header = self .index_header orelse {
switch (removal_type ) {
.swap => self .entries .swapRemove (entry_index ),
.ordered => self .entries .orderedRemove (entry_index ),
}
return ;
};
switch (header .capacityIndexType ()) {
.u8 => self .removeByIndexGeneric (entry_index , ctx , header , u8 , removal_type ),
.u16 => self .removeByIndexGeneric (entry_index , ctx , header , u16 , removal_type ),
.u32 => self .removeByIndexGeneric (entry_index , ctx , header , u32 , removal_type ),
}
}