Hashtable.opIndexAssign

Assign val to the element corresponding to key. If there isn't such a value, return a V.init wrapped inside a Nullable.

struct Hashtable(K, V)
Nullable!V
opIndexAssign
(
U
)
(
U val
,
K key
)
if (
isImplicitlyConvertible!(U, V)
)

Parameters

val U

the value to be set

key K

the key corresponding to a value

Return Value

Type: Nullable!V

a nullable value corresponding to the result or V.init.

Complexity: O(n), where n is the number of elements in the corresponding key bucket.

Meta