pub struct BufferPool { /* private fields */ }Expand description
A pool of reusable String buffers.
Reduces allocation by reusing String buffers for SQL generation.
Implementations§
Source§impl BufferPool
impl BufferPool
Sourcepub fn with_capacity(default_capacity: usize) -> Self
pub fn with_capacity(default_capacity: usize) -> Self
Create a pool with custom default buffer capacity.
Sourcepub fn get(&self) -> PooledBuffer<'_>
pub fn get(&self) -> PooledBuffer<'_>
Get a buffer from the pool or create a new one.
Trait Implementations§
Source§impl Debug for BufferPool
impl Debug for BufferPool
Source§impl Default for BufferPool
impl Default for BufferPool
Source§fn default() -> BufferPool
fn default() -> BufferPool
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for BufferPool
impl !RefUnwindSafe for BufferPool
impl Send for BufferPool
impl Sync for BufferPool
impl Unpin for BufferPool
impl UnwindSafe for BufferPool
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