Hash

A Hash object that is immutable with time travelling features.

Constructors

this
this(V[K] data)

Initialize a hash with data from a standard hash

Members

Aliases

Value
alias Value = Nullable!V
Undocumented in source.

Functions

compact
auto compact()

Compacts the storage hash to speed up lookups.

insert
auto insert(K key, V value)

Create a new hash with the passed in value set.

keys
K[] keys()

Returns all the keys in the hash which have a non null value.

opApply
int opApply(int delegate(K key, V value) dg)

Makes foreach work on this class.

opIndex
Value opIndex(K key)

Fetch a value from the hash. Raise an error if the key does not exist in the hash.

purge
auto purge()

Purge the previous version from history.

remove
auto remove(K key)

Returns an updated hash with a key value removed from the hash.

rollBack
auto rollBack()

Return the previous state of the hash.

values
V[] values()

Returns an array of all the values in the hash.

Meta