pub struct Pool { /* private fields */ }Expand description
Memory pool for buffer reuse
Implementations§
Source§impl Pool
impl Pool
Sourcepub fn with_config(config: PoolConfig) -> Result<Self>
pub fn with_config(config: PoolConfig) -> Result<Self>
Create a new pool with custom configuration
Sourcepub fn allocate(&self, size: usize) -> Result<PooledBuffer>
pub fn allocate(&self, size: usize) -> Result<PooledBuffer>
Allocate a buffer from the pool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pool
impl !RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl !UnwindSafe for Pool
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