generational-lru
Crate providing a 100% safe, generational arena based LRU cache implementation.
use ;
let capacity = 5;
let mut lru_cache = with_capacity;
assert_eq!;
for ele in 0..capacity
for ele in 0..capacity
let x = capacity as i32;
assert!;
assert_eq!;
assert_eq!;
let x = capacity as i32 / 2;
assert_eq!;
assert_eq!;
assert_eq!;
// zero capacity LRUCache is unusable
let mut lru_cache = with_capacity;
assert!;
Refer to API documentation for more details.
Usage
This is a library crate. You may include it in your Cargo.toml as follows:
[]
= "0.1"
License
This repository is licensed under the MIT License. See LICENSE for the full license text.