Fields

hash_map: HashMap,

Namespaces

Functions

fn count(self: EnvMap) HashMap.Size

Returns the number of KV pairs stored in the map.

fn deinit(self: *EnvMap) void

Free the backing storage of the map, as well as all of the stored keys and valu…

Free the backing storage of the map, as well as all of the stored keys and values.

fn get(self: EnvMap, key: []const u8) ?[]const u8

Return the map’s copy of the value associated with a key. The returned string …

Return the map’s copy of the value associated with a key. The returned string is invalidated if this key is removed from the map. On Windows key must be a valid UTF-8 string.

fn getPtr(self: EnvMap, key: []const u8) ?*[]const u8

Find the address of the value associated with a key. The returned pointer is in…

Find the address of the value associated with a key. The returned pointer is invalidated if the map resizes. On Windows key must be a valid UTF-8 string.

fn init(allocator: Allocator) EnvMap

Create a EnvMap backed by a specific allocator. That allocator will be used for…

Create a EnvMap backed by a specific allocator. That allocator will be used for both backing allocations and string deduplication.

fn iterator(self: *const EnvMap) HashMap.Iterator

Returns an iterator over entries in the map.

fn put(self: *EnvMap, key: []const u8, value: []const u8) !void

key and value are copied into the EnvMap. On Windows key must be a valid …

key and value are copied into the EnvMap. On Windows key must be a valid UTF-8 string.

fn putMove(self: *EnvMap, key: []u8, value: []u8) !void

Same as put but the key and value become owned by the EnvMap rather than bein…

Same as put but the key and value become owned by the EnvMap rather than being copied. If putMove fails, the ownership of key and value does not transfer. On Windows key must be a valid UTF-8 string.

fn remove(self: *EnvMap, key: []const u8) void

Removes the item from the map and frees its value. This invalidates the value r…

Removes the item from the map and frees its value. This invalidates the value returned by get() for this key. On Windows key must be a valid UTF-8 string.

Values

Size
undefined