pub struct ArenaPool { /* private fields */ }Expand description
A pool of reusable bump arenas.
When a temporary arena is needed (e.g., for evaluating a single expression), it can be acquired from the pool and returned after use rather than creating a new one each time.
Implementations§
Source§impl ArenaPool
impl ArenaPool
Sourcepub fn with_config(max_pool_size: usize, chunk_size: usize) -> Self
pub fn with_config(max_pool_size: usize, chunk_size: usize) -> Self
Create a new arena pool with custom parameters.
Sourcepub fn available_count(&self) -> usize
pub fn available_count(&self) -> usize
Number of available arenas in the pool.
Sourcepub fn stats(&self) -> &ArenaPoolStats
pub fn stats(&self) -> &ArenaPoolStats
Get the pool statistics.
Sourcepub fn set_max_pool_size(&mut self, size: usize)
pub fn set_max_pool_size(&mut self, size: usize)
Set the maximum pool size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArenaPool
impl RefUnwindSafe for ArenaPool
impl Send for ArenaPool
impl Sync for ArenaPool
impl Unpin for ArenaPool
impl UnsafeUnpin for ArenaPool
impl UnwindSafe for ArenaPool
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