pub fn getOrPut(self: *Self, key: K) Allocator.Error!GetOrPutResult self: *Selfkey: K261
262
263 pub fn getOrPut(self: *Self, key: K) Allocator.Error!GetOrPutResult {
return self.unmanaged.getOrPutContext(self.allocator, key, self.ctx);
}
If key exists this function cannot fail. If there is an existing item with
key, then the result'sEntrypointers point to it, and found_existing is true. Otherwise, puts a new item with undefined value, and theEntrypointers point to it. Caller should then initialize the value (but not the key).