[−][src]Macro forest_bitfield::bitfield
Constructs a BitField
from a given list of 1s and 0s.
Examples
use bitfield::bitfield; let mut bf = bitfield![0, 1, 1, 0, 1, 0, 0, 0, 1, 1]; assert!(bf.get(1)); assert!(!bf.get(3)); bf.set(3); assert_eq!(bf.len(), 6); assert_eq!(bf.ranges().next(), Some(1..5));