Type Alias BitAlloc256

Source
pub type BitAlloc256 = BitAllocCascade16<BitAlloc16>;
Expand description

A bitmap of 256 bits

§Example

use bitmap_allocator::{BitAlloc, BitAlloc256};

let mut ba = BitAlloc256::default();
ba.insert(0..16);
for i in 0..16 {
    assert!(ba.test(i));
}
ba.remove(2..8);
assert_eq!(ba.alloc(), Some(0));
assert_eq!(ba.alloc(), Some(1));
assert_eq!(ba.alloc(), Some(8));
ba.dealloc(0);
ba.dealloc(1);
ba.dealloc(8);

assert!(!ba.is_empty());

Aliased Type§

pub struct BitAlloc256 { /* private fields */ }