13 releases

0.0.13 Dec 9, 2024
0.0.12 Dec 8, 2024
0.0.11 Nov 26, 2024
0.0.2 Oct 8, 2024
0.0.1 Sep 28, 2024

#417 in Data structures

Download history 514/week @ 2024-12-08 117/week @ 2024-12-15 69/week @ 2024-12-22 144/week @ 2024-12-29 123/week @ 2025-01-05 122/week @ 2025-01-12 10/week @ 2025-01-19 4/week @ 2025-01-26 37/week @ 2025-02-09 73/week @ 2025-02-16 28/week @ 2025-02-23 143/week @ 2025-03-02 111/week @ 2025-03-09 196/week @ 2025-03-16 177/week @ 2025-03-23

630 downloads per month
Used in 59 crates (34 directly)

MIT license

16KB
283 lines

SeqMap

SeqMap is a deterministic and ordered map implementation in Rust that preserves the insertion order of key-value pairs. It combines the efficiency of a HashMap for quick key lookups with the ordered iteration provided by a Vec. This makes SeqMap ideal for scenarios where the order of elements is important and predictable.

Features

  • Deterministic Ordering: Maintains the order of key-value pairs based on their insertion sequence.
  • Efficient Lookups: Utilizes a HashMap internally for O(1) average-case key lookups.
  • Comprehensive API: Provides methods for insertion, retrieval, mutation, iteration, and more.

Installation

Add seq-map to your Cargo.toml dependencies:

[dependencies]
seq-map = "0.0.1"

No runtime deps