Trait hibitset::DrainableBitSet

source ·
pub trait DrainableBitSet: BitSetLike {
    // Required method
    fn remove(&mut self, i: u32) -> bool;

    // Provided method
    fn drain<'a>(&'a mut self) -> DrainBitIter<'a, Self> 
       where Self: Sized { ... }
}
Expand description

A extension to the BitSetLike trait which allows draining it.

Required Methods§

source

fn remove(&mut self, i: u32) -> bool

Removes bit from the bit set.

Returns true if removal happened and false otherwise.

Provided Methods§

source

fn drain<'a>(&'a mut self) -> DrainBitIter<'a, Self>
where Self: Sized,

Create a draining iterator that will scan over the keyspace and clears it while doing so.

Implementations on Foreign Types§

source§

impl<'a, T> DrainableBitSet for &'a mut T
where T: DrainableBitSet,

source§

fn remove(&mut self, i: u32) -> bool

Implementors§