pub struct BufferPool { /* private fields */ }Expand description
BufferPool for Mono-thread context
Implementations§
Source§impl BufferPool
impl BufferPool
Sourcepub fn get(&self) -> Option<BufferGuard>
pub fn get(&self) -> Option<BufferGuard>
Get a new buffer from the pool
Return None if none buffer available
Sourcepub fn clean_excess_buffer(&mut self)
pub fn clean_excess_buffer(&mut self)
Optimize the number of buffer by deleted excess buffer of the pool
Sourcepub fn from_builder(builder: &BufferPoolBuilder) -> Self
pub fn from_builder(builder: &BufferPoolBuilder) -> Self
Like BufferPoolBuilder.build_mono_thread()
Trait Implementations§
Source§impl Clone for BufferPool
impl Clone for BufferPool
Source§fn clone(&self) -> BufferPool
fn clone(&self) -> BufferPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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