pub struct BuildMemoryManager {
pub arena: Arena,
pub element_pool: ObjectPool<Element>,
pub small_string_pool: ObjectPool<String>,
pub buffer_pool: ObjectPool<Vec<u8>>,
}
Expand description
Memory manager for the entire build process
Fields§
§arena: Arena
Arena for temporary allocations
element_pool: ObjectPool<Element>
Element pool
small_string_pool: ObjectPool<String>
String pool for small strings
buffer_pool: ObjectPool<Vec<u8>>
Large buffer pool for XML generation
Implementations§
Source§impl BuildMemoryManager
impl BuildMemoryManager
Sourcepub fn memory_usage(&self) -> MemoryStats
pub fn memory_usage(&self) -> MemoryStats
Get memory usage statistics
Sourcepub fn reset_for_next_build(&self)
pub fn reset_for_next_build(&self)
Reset manager for next build (keeps pools)
Sourcepub fn full_reset(&self)
pub fn full_reset(&self)
Full reset including all pools
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BuildMemoryManager
impl !RefUnwindSafe for BuildMemoryManager
impl !Send for BuildMemoryManager
impl !Sync for BuildMemoryManager
impl Unpin for BuildMemoryManager
impl !UnwindSafe for BuildMemoryManager
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 more