4 releases (2 breaking)

Uses old Rust 2015

0.4.1 Mar 13, 2018
0.4.0 Mar 17, 2017
0.3.0 Jan 26, 2017
0.1.0 Feb 27, 2016

#463 in Caching

Download history 331/week @ 2026-02-11 484/week @ 2026-02-18 516/week @ 2026-02-25 3193/week @ 2026-03-04 804/week @ 2026-03-11 867/week @ 2026-03-18 573/week @ 2026-03-25 1001/week @ 2026-04-01 1257/week @ 2026-04-08 692/week @ 2026-04-15 487/week @ 2026-04-22 370/week @ 2026-04-29 936/week @ 2026-05-06 3215/week @ 2026-05-13 1452/week @ 2026-05-20 990/week @ 2026-05-27

6,622 downloads per month

MIT license

10KB
204 lines

HashMap with entries living for limited period of time.


transient-hashmap

Simple rust HashMap with transient entries.

Build Status

Documentation

Example

use transient_hashmap::TransientHashMap;

let entry_lifetime_seconds = 0;
let mut map = TransientHashMap::new(entry_lifetime_seconds);
map.insert(10, "Hello World");

// Clear old entries
map.prune();

// Item is not there
assert_eq!(map.contains_key(10), false);

Cargo.toml

[dependencies]
transient-hashmap = "0.4"

No runtime deps