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

#147 in Caching

Download history 103/week @ 2023-12-06 211/week @ 2023-12-13 114/week @ 2023-12-20 56/week @ 2023-12-27 82/week @ 2024-01-03 131/week @ 2024-01-10 103/week @ 2024-01-17 104/week @ 2024-01-24 78/week @ 2024-01-31 79/week @ 2024-02-07 118/week @ 2024-02-14 120/week @ 2024-02-21 181/week @ 2024-02-28 162/week @ 2024-03-06 151/week @ 2024-03-13 154/week @ 2024-03-20

665 downloads per month

MIT license

10KB
204 lines

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"

lib.rs:

HashMap with entries living for limited period of time.

No runtime deps