santh-bufpool 0.1.0

Typed buffer recycling with fixed size classes and lock-free checkout/return
Documentation
/// Configuration for a [`BufferPool`](crate::BufferPool).
///
/// # Examples
///
/// ```rust
/// use santh_bufpool::PoolConfig;
///
/// let config = PoolConfig {
///     four_kib_count: 4,
///     sixty_four_kib_count: 2,
///     two_fifty_six_kib_count: 1,
///     one_mib_count: 0,
///     numa_node: None,
/// };
/// assert_eq!(config.four_kib_count, 4);
/// ```
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PoolConfig {
    /// Number of 4 KiB buffers to preallocate.
    pub four_kib_count: usize,
    /// Number of 64 KiB buffers to preallocate.
    pub sixty_four_kib_count: usize,
    /// Number of 256 KiB buffers to preallocate.
    pub two_fifty_six_kib_count: usize,
    /// Number of 1 MiB buffers to preallocate.
    pub one_mib_count: usize,
    /// Optional NUMA node for initial placement (requires the `numa` feature).
    pub numa_node: Option<u32>,
}