Skip to main content

DrainableBitSet

Trait 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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§