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)
  2. UnsafeHashMap dup()
    struct UnsafeHashMap(Key, Value)
    const
    dup
    ()

Return Value

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