use crate::depot::{arena::linked::slots, capacity, queue::pool};
unsafe impl<'a, T, S, R, const TRACK: bool> crate::depot::raw::Project<(), pool::Head>
for (pool::Lane<'a, T, S, TRACK>, R)
{
type Output = (pool::Front<'a, T, S, TRACK>, R);
unsafe fn project(self, _: ()) -> Self::Output {
let (lane, retained) = self;
let index = lane.slot.queue.links.head_raw();
(pool::Front::new(lane, index), retained)
}
}
impl<'a, T, S> pool::Lane<'a, T, S> {
pub unsafe fn reserve_exact(
self,
count: capacity::Count,
) -> slots::Reserve<T, slots::Bound<'a, T>> {
let owner = unsafe { self.slot.queue.bind(self.store) };
unsafe { slots::Reserve::new(owner, count) }
}
}