pub struct StructureBatchPool { /* private fields */ }Expand description
One reusable columnar batch owned by a structural source.
Retained capacity never becomes invisible to the execution budget: the pool stores the live reservation beside the buffer and releases both when the source is dropped.
Implementations§
Source§impl StructureBatchPool
impl StructureBatchPool
Sourcepub fn acquire(
&self,
descriptor: ChunkDescriptor,
reserve_bytes: usize,
max_retained_bytes: usize,
context: &ExecutionContext,
) -> Result<Option<(StructureBatchBuilder, MemoryReservation)>, StructureBatchError>
pub fn acquire( &self, descriptor: ChunkDescriptor, reserve_bytes: usize, max_retained_bytes: usize, context: &ExecutionContext, ) -> Result<Option<(StructureBatchBuilder, MemoryReservation)>, StructureBatchError>
Acquires a fresh or recycled builder after charging its full working
allowance. A recycled allocation may exceed reserve_bytes when its
existing reservation still covers it and it remains within
max_retained_bytes. None means the context cannot currently make
progress.
§Errors
Rejects unrepresentable batch identity.
Sourcepub fn lease(
&self,
buffer: StructureBatchBuffer,
reservation: MemoryReservation,
) -> Result<BatchLease<StructureBatch>, StructureBatchError>
pub fn lease( &self, buffer: StructureBatchBuffer, reservation: MemoryReservation, ) -> Result<BatchLease<StructureBatch>, StructureBatchError>
Publishes a batch whose capacity returns to this pool with its lease.
§Errors
Rejects a batch larger than the producer’s reservation.
Sourcepub fn recycle(
&self,
buffer: StructureBatchBuffer,
reservation: MemoryReservation,
)
pub fn recycle( &self, buffer: StructureBatchBuffer, reservation: MemoryReservation, )
Keeps a rejected candidate available for a subsequent demand.
Trait Implementations§
Source§impl Clone for StructureBatchPool
impl Clone for StructureBatchPool
Source§impl Debug for StructureBatchPool
impl Debug for StructureBatchPool
Auto Trait Implementations§
impl Freeze for StructureBatchPool
impl RefUnwindSafe for StructureBatchPool
impl Send for StructureBatchPool
impl Sync for StructureBatchPool
impl Unpin for StructureBatchPool
impl UnsafeUnpin for StructureBatchPool
impl UnwindSafe for StructureBatchPool
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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