UnsafeHashMap.dup

Creates an independent copy of a hash table.

Elements are copied by simple assignment, which may translate into a shallow copy.

  1. UnsafeHashMap dup(err_t error)
    struct UnsafeHashMap(Key, Value)
    const nothrow
    dup
    ()
  2. UnsafeHashMap dup()

Parameters

error err_t

Set to zero on success, non-zero otherwise.

Return Value

A shallow copy of the given hash table, or an empty table in case of failure (OOM).