This crate allows automatic caching of T.len()
with an api that
allows drop in replacement for parking_lot
Mutex
and RwLock
for most common use-cases.
This crate implements Len
for the following types:
std::collections::{VecDeque, LinkedList, HashMap, BTreeMap, HashSet, BTreeSet, BinaryHeap}
Example
extern crate len_caching_lock;
use LenCachingMutex;