8 releases (1 stable)
1.0.0 | Jul 6, 2023 |
---|---|
0.3.1 | Jul 5, 2023 |
0.2.0 | Jul 3, 2023 |
0.1.5 | Jul 1, 2023 |
#345 in Concurrency
52 downloads per month
Used in sketch-2d
10KB
185 lines
FnStore
A dynamic persistent value store using closure type as key and storing its return value
Usage
use fn_store::LocalFnStore;
let mut store = LocalFnStore::new();
let a = *store.get(|| 1);
let b = *store.get(|| 2);
assert_eq!(a, 1);
assert_eq!(b, 2);
License
MIT
Dependencies
~1.8–7MB
~35K SLoC