#container #set #map #indexable

hitree

Indexable containers for Rust: HiSet and HiMap

4 releases

0.1.4 Jun 9, 2022
0.1.3 Apr 24, 2022
0.1.2 Apr 24, 2022
0.1.1 Apr 23, 2022
0.1.0 Apr 23, 2022

#1978 in Data structures

44 downloads per month

Apache-2.0

46KB
700 lines

Indexable containers for Rust

This crate provides two high performance containers that in addition to standard access by key also support access by index.

Work in progress, don't use until 1.0 release!

HiSet

HiMap


lib.rs:

Indexable containers

This crate contains set and map implementations backed by a balanced binary tree with subtree node count tracking, allowing easy random access by index of the value within the order implied by the set value or map key. Tree nodes are stored on heap using Box.

Features

Feature HiSet HiMap
Zero allocation initialization new todo
Insert with automatic conversion insert todo
Borrow value by index get_by_index
get_by_index_mut
todo
Borrow value by key get
get_mut
todo
Find index of value by key index_of todo
Remove first/last entry take_first
take_last
todo
Remove entry by index take_by_index todo
Remove entry by key reference take todo

No runtime deps