pub enum DeallocStrategy {
PeriodTick {
period: usize,
state: usize,
},
PeriodTime {
period: Duration,
state: Instant,
},
Never,
}
Expand description
The strategy defines the frequency at which deallocation of unused memory chunks should occur.
Variants§
PeriodTick
Once every n calls to reserve.
Fields
PeriodTime
Once every period of time
Fields
Never
Never deallocate.
Implementations§
source§impl DeallocStrategy
impl DeallocStrategy
sourcepub fn new_period_tick(period: usize) -> Self
pub fn new_period_tick(period: usize) -> Self
Create a new strategy with the given period.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeallocStrategy
impl RefUnwindSafe for DeallocStrategy
impl Send for DeallocStrategy
impl Sync for DeallocStrategy
impl Unpin for DeallocStrategy
impl UnwindSafe for DeallocStrategy
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