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>) -> 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§
source§impl Clone for MemoryConsumer
impl Clone for MemoryConsumer
source§fn clone(&self) -> MemoryConsumer
fn clone(&self) -> MemoryConsumer
Returns a copy 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 moresource§impl Debug for MemoryConsumer
impl Debug for MemoryConsumer
source§impl Hash for MemoryConsumer
impl Hash for MemoryConsumer
source§impl PartialEq for MemoryConsumer
impl PartialEq for MemoryConsumer
impl Eq for MemoryConsumer
impl StructuralPartialEq for MemoryConsumer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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