Struct datafusion_execution::memory_pool::MemoryConsumer  
source · pub struct MemoryConsumer { /* private fields */ }Expand description
A memory consumer that can be tracked by MemoryReservation in
a MemoryPool. All allocations are registered to a particular
MemoryConsumer;
Implementations§
source§impl MemoryConsumer
 
impl MemoryConsumer
sourcepub fn new(name: impl Into<String>) -> Self
 
pub fn new(name: impl Into<String>) -> Self
Create a new empty MemoryConsumer that can be grown using MemoryReservation
sourcepub fn with_can_spill(self, can_spill: bool) -> Self
 
pub fn with_can_spill(self, can_spill: bool) -> Self
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 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