A high-performance, thread-safe HashMap implementation for Rust that provides fine-grained locking at the key level.
use lockmap::LockMap;
// Create a new lock map
let map = LockMap::new();
// Set a value
map.set("key", "value");
// Get a value
assert_eq!(map.get("key"), Some("value"));
// Use entry API for exclusive access
{
let entry = map.entry("key");
*entry.value = Some("new value");
}
// Remove a value
map.remove("key");