Function HashTable.capacity

Maximum amount of elements this HashTable can hold without resizing and rehashing. Note that it doesn't mean that the Set will hold exactly capacity elements. capacity tells the size of the container under a best-case distribution of elements.

size_t capacity() const @property;

Returns

HashTable capacity.

Example

HashTable!(string, int) hashTable;
assert(hashTable.capacity == 0);

hashTable["eight"] = 8;
assert(hashTable.capacity == 3);