o3 0.62.0

shared-nothing primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::depot::arena::pool;

/// Retires this initialized uniquely held value before recycling its slot.
/// # Safety
/// Retiring must consume the exact terminal owner once, end all value loans, and recycle only its own slot after completing the value cleanup.
pub unsafe trait Policy<T, C> {
    fn retire(entry: pool::raw::Terminal<'_, T, C>);
}

unsafe impl<T, C> Policy<T, C> for () {
    fn retire(entry: pool::raw::Terminal<'_, T, C>) {
        entry.recycle();
    }
}