Skip to content

andersjl/rand_map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A map that creates a random handle on insertion to use when retrieving.

The raison d'être for this map is:

  • You want to put something in a map, but you have no key. Means you do not want to use a HashMap or BTreeMap .

  • You want to forget the details of what you put in to later retrieve it with a simple handle, and you are not interested in how many equal objects you insert. Means you do not want to use a HashSet or HashMultiSet .

  • You want a persistent handle to refer to the item you put in the map. Means you do not want to use a Vec.

The implementation uses a HashMap that does not actually hash. The contained HashMap can be borrowed (.as_hash_map()), so all HashMap functions that do not change the map are at your disposal.

About

A map that creates a random handle on insertion to use when retrieving

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages