Struct datafusion::execution::memory_pool::MemoryConsumer
source · pub struct MemoryConsumer { /* private fields */ }
Expand description
A memory consumer is a named allocation traced by a particular
MemoryReservation
in a MemoryPool
. All allocations are registered to
a particular MemoryConsumer
;
For help with allocation accounting, see the proxy module.
Implementations§
source§impl MemoryConsumer
impl MemoryConsumer
sourcepub fn new(name: impl Into<String>) -> MemoryConsumer
pub fn new(name: impl Into<String>) -> MemoryConsumer
Create a new empty MemoryConsumer
that can be grown using MemoryReservation
sourcepub fn with_can_spill(self, can_spill: bool) -> MemoryConsumer
pub fn with_can_spill(self, can_spill: bool) -> MemoryConsumer
Set whether this allocation can be spilled to disk
sourcepub fn register(self, pool: &Arc<dyn MemoryPool>) -> MemoryReservation
pub fn register(self, pool: &Arc<dyn MemoryPool>) -> MemoryReservation
Registers this MemoryConsumer
with the provided MemoryPool
returning
a MemoryReservation
that can be used to grow or shrink the memory reservation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryConsumer
impl RefUnwindSafe for MemoryConsumer
impl Send for MemoryConsumer
impl Sync for MemoryConsumer
impl Unpin for MemoryConsumer
impl UnwindSafe for MemoryConsumer
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> 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