pub struct RetentionRule {
pub duration: RetentionSpan,
pub keep: RetentionSpan,
}Expand description
An individual rule in a retention policy
- 4h:1h - for 4 hours, keep a checkpoint every hour
- 1W:U - for 1 week, keep every checkpoint
- 4W:1D - for 4 weeks, keep a checkpoint every day
- 6M:1W - for 6 months, keep a checkpoint every week
- 1Y:1M - for 1 year, keep a checkpoint every month
- U:6M - for all time, keep a checkpoint every 6 months
Fields§
§duration: RetentionSpanFor checkpoints created in this duration…
keep: RetentionSpankeep this many
Trait Implementations§
Source§impl Clone for RetentionRule
impl Clone for RetentionRule
Source§fn clone(&self) -> RetentionRule
fn clone(&self) -> RetentionRule
Returns a duplicate of the value. Read more
1.0.0 · 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 RetentionRule
impl Debug for RetentionRule
Source§impl Display for RetentionRule
impl Display for RetentionRule
Source§impl FromStr for RetentionRule
impl FromStr for RetentionRule
Source§impl PartialEq for RetentionRule
impl PartialEq for RetentionRule
impl Copy for RetentionRule
impl Eq for RetentionRule
impl StructuralPartialEq for RetentionRule
Auto Trait Implementations§
impl Freeze for RetentionRule
impl RefUnwindSafe for RetentionRule
impl Send for RetentionRule
impl Sync for RetentionRule
impl Unpin for RetentionRule
impl UnwindSafe for RetentionRule
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