When attempting to implement a pool with slab, we have a need to access/pop an arbitrary element. I propose the api
impl<T> Slab<T>{
pub fn take(&mut self)->Option<T>{
...
}
}
Which will remove and return an arbitrary element (if one exists). As for implementation, it seems simple enough to always remove and return the element at self.next - 1