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

#803 in Data structures

Download history 185/week @ 2024-09-25 148/week @ 2024-10-02 99/week @ 2024-10-09 82/week @ 2024-10-16 51/week @ 2024-10-23 17/week @ 2024-10-30 8/week @ 2024-11-06 473/week @ 2024-11-13 561/week @ 2024-11-20 326/week @ 2024-11-27 459/week @ 2024-12-04 225/week @ 2024-12-11 76/week @ 2024-12-18 150/week @ 2024-12-25 81/week @ 2025-01-01 166/week @ 2025-01-08

483 downloads per month
Used in 27 crates (11 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