[][src]Crate ahtable

An implementation of ArrayHash

ArrayHash is a data structure where the index is determined by hash and each entry in array is a Vec that store data and all it collision.

Oritinal paper can be found [here](Askitis, N. & Zobel, J. (2005), Cache-conscious collision resolution for string hash tables, in ‘Proc. SPIRE String Processing and Information Retrieval Symp.’, Springer-Verlag, pp. 92–104)

This implementation try to use generic wherever possible. It end up with ArrayHash that take anything that is clonable as value and anything that implement Hash, PartialEq, and Clone as key. It let you choose whichever Hasher that you want. The only constraint is that Hasher must implement Clone trait.

It supports read only iteration, mutably iteration, and owned iteration.

To create ArrayHash use ArrayHashBuilder. The default Hasher is XxHasher64.



An implementation of ArrayHash in pure Rust.


A builder that use for build an ArrayHash.


An iterator that return a mutably reference to each entry in ArrayHash. It is useful for scanning entire ArrayHash to manipulate it value.


An iterator that return a reference to each entry in ArrayHash. It is useful for scanning entire ArrayHash.


An iterator that will drain it underlying ArrayHash.


An iterator that remove and return element that satisfy predicate. It will also update the size of borrowed ArrayHash on each iteration.