pub struct GcConfig {
pub max_blocks_per_run: usize,
pub time_limit: Option<Duration>,
pub incremental: bool,
pub batch_size: usize,
pub batch_delay: Duration,
pub dry_run: bool,
}Expand description
GC configuration
Fields§
§max_blocks_per_run: usizeMaximum blocks to collect in a single run (0 = unlimited)
time_limit: Option<Duration>Time limit for a single GC run (None = unlimited)
incremental: boolWhether to run incrementally (pause between batches)
batch_size: usizeBatch size for incremental GC
batch_delay: DurationDelay between incremental batches
dry_run: boolWhether to perform a dry run (don’t actually delete)
Implementations§
Source§impl GcConfig
impl GcConfig
Sourcepub fn incremental() -> Self
pub fn incremental() -> Self
Create a configuration for incremental GC
Sourcepub fn with_max_blocks(self, max: usize) -> Self
pub fn with_max_blocks(self, max: usize) -> Self
Set max blocks per run
Sourcepub fn with_time_limit(self, duration: Duration) -> Self
pub fn with_time_limit(self, duration: Duration) -> Self
Set time limit
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GcConfig
impl RefUnwindSafe for GcConfig
impl Send for GcConfig
impl Sync for GcConfig
impl Unpin for GcConfig
impl UnwindSafe for GcConfig
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§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