pub struct ArenaAllocator { /* private fields */ }Expand description
Arena allocator for query execution All allocations are freed together when the arena is dropped
Implementations§
Source§impl ArenaAllocator
impl ArenaAllocator
Sourcepub fn with_chunk_size(chunk_size: usize) -> Self
pub fn with_chunk_size(chunk_size: usize) -> Self
Create arena with specific chunk size
Sourcepub fn alloc_layout(&self, layout: Layout) -> NonNull<u8>
pub fn alloc_layout(&self, layout: Layout) -> NonNull<u8>
Allocate with specific layout
Sourcepub fn total_allocated(&self) -> usize
pub fn total_allocated(&self) -> usize
Get total allocated bytes across all chunks
Trait Implementations§
Source§impl Default for ArenaAllocator
impl Default for ArenaAllocator
Source§impl Drop for ArenaAllocator
impl Drop for ArenaAllocator
impl Send for ArenaAllocator
impl Sync for ArenaAllocator
Auto Trait Implementations§
impl !Freeze for ArenaAllocator
impl !RefUnwindSafe for ArenaAllocator
impl Unpin for ArenaAllocator
impl !UnwindSafe for ArenaAllocator
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request