pub struct RetentionPolicy {
pub keep_all_below: u128,
pub hourly_below: u128,
pub daily_below: u128,
pub max_versions: usize,
pub max_object_bytes: u64,
}Expand description
Controls the age windows used by thin_versions to decide which versions
survive thinning.
All values are in milliseconds. The default matches the Time-Machine windows documented in this module’s top-level description.
Fields§
§keep_all_below: u128Below this age, every version is kept (ms).
hourly_below: u128Below this age, keep one per hour (ms).
daily_below: u128Below this age, keep one per day (ms).
max_versions: usizeMaximum number of versions to retain (named versions and the latest are exempt from being dropped, but DO count toward the total).
max_object_bytes: u64Maximum total compressed bytes of objects referenced by retained versions.
Trait Implementations§
Source§impl Clone for RetentionPolicy
impl Clone for RetentionPolicy
Source§fn clone(&self) -> RetentionPolicy
fn clone(&self) -> RetentionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetentionPolicy
impl Debug for RetentionPolicy
Source§impl Default for RetentionPolicy
impl Default for RetentionPolicy
Source§impl PartialEq for RetentionPolicy
impl PartialEq for RetentionPolicy
Source§fn eq(&self, other: &RetentionPolicy) -> bool
fn eq(&self, other: &RetentionPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RetentionPolicy
Auto Trait Implementations§
impl Freeze for RetentionPolicy
impl RefUnwindSafe for RetentionPolicy
impl Send for RetentionPolicy
impl Sync for RetentionPolicy
impl Unpin for RetentionPolicy
impl UnsafeUnpin for RetentionPolicy
impl UnwindSafe for RetentionPolicy
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