pub enum Retention {
Years(u32),
Months(u32),
Days(u32),
}Expand description
How long a version is kept after it is stored.
Variants§
Years(u32)
This many calendar years, written 7y.
Months(u32)
This many calendar months, written 18m.
Days(u32)
This many days of 24 hours, written 90d.
Implementations§
Source§impl Retention
impl Retention
Sourcepub fn parse(text: &str) -> Option<Retention>
pub fn parse(text: &str) -> Option<Retention>
Reads a period written by Display: decimal digits with no sign and
no leading zero, then y, m or d.
Sourcepub fn after(self, at: OffsetDateTime) -> Option<OffsetDateTime>
pub fn after(self, at: OffsetDateTime) -> Option<OffsetDateTime>
The time this period after at, in UTC, or None if that is past
the last time this build can hold.
Trait Implementations§
impl Copy for Retention
impl Eq for Retention
impl StructuralPartialEq for Retention
Auto Trait Implementations§
impl Freeze for Retention
impl RefUnwindSafe for Retention
impl Send for Retention
impl Sync for Retention
impl Unpin for Retention
impl UnsafeUnpin for Retention
impl UnwindSafe for Retention
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.