algorithm 0.1.18

about algorithm data structure, now has ttl with lru/lru-k/lfu/arc and slab/rbtree/roaring_bitmap/timer_wheelss, 关于算法常用的数据结构
Documentation
1
2
3
4
5
6
7
8
9
10
use algorithm::CircularBuffer;
fn main() {
    let mut circular = CircularBuffer::new(2);
    circular.push_back(1);
    circular.push_back(2);
    circular.push_back(3);
    assert_eq!(circular.len(), 2);
    assert_eq!(circular[0], 2);
    assert_eq!(circular[1], 3);
}