o3 0.61.0

shared-nothing primitives
Documentation
use crate::depot::{arena::linked::slots, capacity, queue::pool};

// SAFETY: Head retains this exact lane's current initialized head until projection.
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> {
    /// # Safety
    /// The same owner loan preserves at least `count` available slots in this store.
    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) }
    }
}