pub struct TtlConfig {
pub default_ttl: Option<Duration>,
pub sweep_interval: Duration,
pub max_checkpoints: Option<usize>,
}Expand description
Time-to-live configuration for checkpoint expiration
Configures automatic cleanup of old checkpoints per design spec §5.7.
Fields§
§default_ttl: Option<Duration>Default TTL for checkpoints (None = no expiration)
sweep_interval: DurationInterval between cleanup sweeps for active background cleanup
max_checkpoints: Option<usize>Maximum number of checkpoints to retain per thread/namespace (None = unlimited)
Implementations§
Source§impl TtlConfig
impl TtlConfig
Sourcepub const fn new(
default_ttl: Option<Duration>,
sweep_interval: Duration,
max_checkpoints: Option<usize>,
) -> Self
pub const fn new( default_ttl: Option<Duration>, sweep_interval: Duration, max_checkpoints: Option<usize>, ) -> Self
Create a new TTL configuration
§Arguments
default_ttl- Default time-to-live for checkpoints (None = no expiration)sweep_interval- Interval between active cleanup sweepsmax_checkpoints- Maximum checkpoints to retain (None = unlimited)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TtlConfig
impl RefUnwindSafe for TtlConfig
impl Send for TtlConfig
impl Sync for TtlConfig
impl Unpin for TtlConfig
impl UnsafeUnpin for TtlConfig
impl UnwindSafe for TtlConfig
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