key.var.opIndex
var opIndex(string key) ref @safeAccess a child value by key, turning this instance into a map on first use.
Semantics:
- If this value is currently
Type.NULL, it is converted to a map (Type.OBJECT). - If this value is not a map after that (i.e., it was a scalar or array), an assertion fails.
- Returns a reference to the stored child
var, inserting a defaultvar.initif missing.
Returns
A reference to the value stored at
const(var) opIndex(string key) ref const @safeConst overload of opIndex for read-only map access.
Unlike the mutable overload, this does not convert Type.NULL to a map, and does not insert missing keys. It asserts if the value is not a map or if the key is not present.
Returns
A const reference to the value stored at
key.var opIndex(size_t index) ref @safeNo documentation available for this declaration.
const(var) opIndex(size_t index) ref const @safeConst overload of opIndex for read-only array access.
Returns
A const reference to the element at
index.