DVUI

set

Parameters

#
self:*Data
*Data
gpa:std.mem.Allocator
std.mem.Allocator
key:Key
Key
data:anytype
anytype

Source

Implementation

#
pub fn set(self: *Data, gpa: std.mem.Allocator, key: Key, data: anytype) std.mem.Allocator.Error!void {
    const value, _ = try self.getOrPutT(gpa, key, @TypeOf(data));
    value.* = data;
}