Crate strudel

source ·
Expand description

Insertion-ordered hash table suitable for embedding via FFI.

Drop-in replacement for st_hash originally written by Peter Moore @ UCB and used in Ruby’s implementation of the Hash core class.

StHashMap is designed to implement the st_hash C API and be FFI-friendly.

StHashMap is built on top of the high performance HashMap and Vec in Rust std.

StHashMap, and StHashSet which builds on top of it, support in-place updates of hash keys. No mutable iterators are provided.

The optional api and capi modules in strudel build on top of StHashMap to implement a compatible C API to st_hash. This API includes support for iterating over a mutable map and in-place updates of (key, value) pairs. These features distinguish it from the HashMap in Rust std.

Modules§

Structs§

  • An insertion-ordered hash map implemented with HashMap and Vec.
  • An insertion-ordered hash set implemented as an StHashMap where the value is ().