Adds a bucket element with key as key.
Adds an element to the bucket.
Looks up the element whose key equals key.
Tells whether there is at least one element in this bucket.
Looks up the element corresponding to key in this bucket and removes it, if found.
Bucket element type
First bucket element
Template to be mixed in to a bucket element. Contains the shared core members of a bucket element.
This template mixin is used so that we can use structs for the bucket elements rather than classes, thus avoiding the memory overhead of class instances. In the case of bucket elements, which could exist in quantities of many thousands, this is significant.
Using structs instead of classes means that we can't use an interface or base class, and the Bucket struct (below) has to simply assume that the Element struct has certain members. As it's purely internal, we can live with this.