pub mod group;
pub mod indexed;
pub mod links;
pub mod pool;
pub mod resident;
pub mod ring;
pub mod round;
pub mod tagged;
pub struct Sweep<'a, Q> {
pub(in crate::depot) owner: &'a mut Q,
pub(in crate::depot) remaining: usize,
}
impl<Q> Sweep<'_, Q> {
pub fn len(&self) -> usize {
self.remaining
}
pub fn is_empty(&self) -> bool {
self.remaining == 0
}
pub(in crate::depot) fn take(&mut self) -> Option<&mut Q> {
if self.remaining == 0 {
return None;
}
self.remaining -= 1;
Some(&mut *self.owner)
}
}