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

#199 in Caching

Download history 68/week @ 2024-11-13 103/week @ 2024-11-20 178/week @ 2024-11-27 218/week @ 2024-12-04 284/week @ 2024-12-11 134/week @ 2024-12-18 30/week @ 2024-12-25 115/week @ 2025-01-01 160/week @ 2025-01-08 204/week @ 2025-01-15 150/week @ 2025-01-22 129/week @ 2025-01-29 355/week @ 2025-02-05 258/week @ 2025-02-12 118/week @ 2025-02-19 214/week @ 2025-02-26

969 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