pub struct StreamingShrinkStrategy<T> { /* private fields */ }Expand description
Memory-efficient shrinking strategy that uses streaming
Implementations§
Source§impl<T> StreamingShrinkStrategy<T>
impl<T> StreamingShrinkStrategy<T>
Sourcepub fn new(max_memory_mb: usize) -> Self
pub fn new(max_memory_mb: usize) -> Self
Create a new streaming shrink strategy with memory limit
Sourcepub fn within_memory_limit(&self, additional_bytes: usize) -> bool
pub fn within_memory_limit(&self, additional_bytes: usize) -> bool
Check if we’re within memory limits
Sourcepub fn update_memory_usage(&mut self, bytes: usize)
pub fn update_memory_usage(&mut self, bytes: usize)
Update memory usage tracking
Sourcepub fn reset_memory_usage(&mut self)
pub fn reset_memory_usage(&mut self)
Reset memory usage tracking
Auto Trait Implementations§
impl<T> Freeze for StreamingShrinkStrategy<T>
impl<T> RefUnwindSafe for StreamingShrinkStrategy<T>where
T: RefUnwindSafe,
impl<T> Send for StreamingShrinkStrategy<T>where
T: Send,
impl<T> Sync for StreamingShrinkStrategy<T>where
T: Sync,
impl<T> Unpin for StreamingShrinkStrategy<T>where
T: Unpin,
impl<T> UnwindSafe for StreamingShrinkStrategy<T>where
T: UnwindSafe,
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