Crate ds_ext

source ·
Expand description

This crate repackages standard data structures with additional capabilities, like fast ordered maps and sets.

The ordered collection types use a List internally for ordering. List itself uses a Tree to map a cardinal ordering to a logical ordering.

The map and set types support a Key trait to allow using arbitrary type T: Key<K> to look up an entry with key type K.

Features:

  • all: enables all features
  • serialize: enables support for serde.
  • stream: enables support for destream.
  • hash: enables support for async-hash.

Re-exports§

Modules§

  • A linked ord with cardinal indexing and O(log n) get/insert/remove anywhere in the List.
  • A hash map ordered by key using a linked hash set
  • A linked hash map ordered by insertion which can be reordered by swapping, useful as a simple priority queue (e.g. an LFU or LRU cache).
  • A hash set ordered by key using a linked list.

Structs§

  • A binary search tree which maps cardinal values to ordinal values