Expand description

Red-black tree based defragmentation buffer that maintains inserted and free intervals.

use rbtree_defrag_buffer::DefragBuf;

let mut buf = DefragBuf::new(10);
buf.insert(2..7).unwrap();

let free_invs: Vec<_> = buf.free_intervals().collect();
assert_eq!(free_invs, vec![0..2, 7..10]);

Structs

  • Red-black tree based degragmentation buffer that maintains inserted and free intervals.