Trait hibitset::DrainableBitSet
source · [−]pub trait DrainableBitSet: BitSetLike {
fn remove(&mut self, i: u32) -> bool;
fn drain<'a>(&'a mut self) -> DrainBitIter<'a, Self>ⓘNotable traits for DrainBitIter<'a, T>impl<'a, T> Iterator for DrainBitIter<'a, T> where
T: DrainableBitSet, type Item = u32;
where
Self: Sized,
{ ... }
}
Expand description
A extension to the BitSetLike
trait which allows draining it.
Required Methods
Provided Methods
fn drain<'a>(&'a mut self) -> DrainBitIter<'a, Self>ⓘNotable traits for DrainBitIter<'a, T>impl<'a, T> Iterator for DrainBitIter<'a, T> where
T: DrainableBitSet, type Item = u32;
where
Self: Sized,
fn drain<'a>(&'a mut self) -> DrainBitIter<'a, Self>ⓘNotable traits for DrainBitIter<'a, T>impl<'a, T> Iterator for DrainBitIter<'a, T> where
T: DrainableBitSet, type Item = u32;
where
Self: Sized,
T: DrainableBitSet, type Item = u32;
Create a draining iterator that will scan over the keyspace and clears it while doing so.