1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Abstract interface for managing free slot indices.
//! `Pool` depends only on this trait, not on a particular synchronisation
//! mechanism.
//!
//! Two backends are provided: [`CriticalSlots`](crate::critical::CriticalSlots) (default)
//! and [`CasSlots`](crate::cas::CasSlots) (behind feature `cas`):
//!
//! ```ignore
//! use slotpool::Pool;
//! use slotpool::critical::CriticalSlots;
//! #[cfg(feature = "cas")]
//! use slotpool::cas::CasSlots;
//!
//! type MyPool = Pool<u8, 16>; // default: CriticalSlots
//! type MyCasPool = Pool<u8, 16, CasSlots<16>>; // explicit CAS backend
//! ```
/// Error returned by [`FreeSlots::fill`] when `count` exceeds capacity `N`.
;