UnsafeHashMap.update

Looks up a key's entry in the table, then either updates it or creates a new one (may rehash).

  1. Value update(Key key, const(Create) create, const(Update) update, err_t error)
  2. Value update(Key key, const(Create) create, const(Update) update)
    struct UnsafeHashMap(Key, Value)
    Value
    update
    (
    Create
    Update
    )
    (
    Key key
    ,
    scope auto ref const(Create) create
    ,
    scope auto ref const(Update) update
    )

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.

update const(Update)

Called to update the value of an entry, if it was found.

Return Value

Type: Value

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