pub struct TieredPool { /* private fields */ }Expand description
Statically-owned tiered pool.
Tier 0’s slab is initialised with the Coffer (master key halves in slots 0+1).
All other tiers have init_coffer = false.
TieredPool is Send + Sync: all mutable state is behind Mutex-guarded
fields. The Vec<Tier> contains raw pointers inside SecureSlab, which
requires explicit Send/Sync impls.
Implementations§
Source§impl TieredPool
impl TieredPool
Sourcepub fn new(config: TieredPoolConfig) -> Result<Self>
pub fn new(config: TieredPoolConfig) -> Result<Self>
Create a new TieredPool from config.
Validates, deduplicates, and sorts config.tier_sizes, then allocates
one mlock’d page per tier. Tier 0’s slab initialises the Coffer.
Sourcepub fn max_slab_slot_size(&self) -> usize
pub fn max_slab_slot_size(&self) -> usize
The largest slot size available in any tier.
Sourcepub fn tier_count(&self) -> usize
pub fn tier_count(&self) -> usize
Number of configured tiers.
Sourcepub fn tier_slot_size(&self, i: usize) -> Option<usize>
pub fn tier_slot_size(&self, i: usize) -> Option<usize>
Slot size for tier i, or None if out of range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TieredPool
impl RefUnwindSafe for TieredPool
impl Unpin for TieredPool
impl UnsafeUnpin for TieredPool
impl UnwindSafe for TieredPool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more