fn IndexedArray(comptime I: type, comptime V: type, comptime Ext: ?fn (type) type) type

A dense array of values, using an indexed lookup. This type does no allocation and can be copied by value.

Parameters

I: type,
V: type,
Ext: ?fn (type) type,

Fields

values: [Indexer.count]Value,

Functions

fn get(self: Self, key: Key) Value

Returns the value in the array associated with a key.

fn getPtr(self: *Self, key: Key) *Value

Returns a pointer to the slot in the array associated with a key.

fn getPtrConst(self: *const Self, key: Key) *const Value

Returns a const pointer to the slot in the array associated with a key.

fn initFill(v: Value) Self

No documentation provided.

fn initUndefined() Self

No documentation provided.

fn iterator(self: *Self) Iterator

Iterates over the items in the array, in index order.

fn set(self: *Self, key: Key, value: Value) void

Sets the value in the slot associated with a key.

Values

Indexer
undefined

The index mapping for this map

Key
undefined

The key type used to index this map

Value
undefined

The value type stored in this map

len
undefined

The number of possible keys in the map