pub struct ColumnBufferPool { /* private fields */ }Implementations§
Source§impl ColumnBufferPool
impl ColumnBufferPool
pub fn new() -> Self
Sourcepub fn acquire(&self, target: &Type, min_capacity: usize) -> ColumnBuffer
pub fn acquire(&self, target: &Type, min_capacity: usize) -> ColumnBuffer
Pop a buffer for target whose capacity() >= min_capacity, preferring
the smallest qualifying buffer (best-fit). Falls back to allocating
fresh via ColumnBuffer::with_capacity if target is not poolable
or no qualifying buffer is in the bucket.
Sourcepub fn release(&self, buffer: ColumnBuffer)
pub fn release(&self, buffer: ColumnBuffer)
Clear buffer and return it to the pool indexed by its type. Drops
the buffer if its type is not poolable, or if the bucket is at
CAP_PER_TYPE.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ColumnBufferPool
impl !RefUnwindSafe for ColumnBufferPool
impl Send for ColumnBufferPool
impl Sync for ColumnBufferPool
impl Unpin for ColumnBufferPool
impl UnsafeUnpin for ColumnBufferPool
impl UnwindSafe for ColumnBufferPool
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more