UnsafeHashMap.require

Looks up a key's entry, inserting one if not found (may rehash).

  1. Value require(Key key, const(Create) create, err_t error)
    struct UnsafeHashMap(Key, Value)
    pragma(inline)
    Value
    require
    (
    Create
    )
    (
    Key key
    ,
    scope auto ref const(Create) create
    ,)
  2. Value require(Key key, const(Create) create)

Parameters

key Key

Key being looked up and stored in the table.

create const(Create)

Called to construct a new value if the key isn't in the table.

error err_t

Set to zero on success, non-zero otherwise.

Return Value

Type: Value

The entry's final value (or its .init in case of failure).