pub struct BlobRetention {
pub mode: String,
pub period_ns: i64,
}Expand description
Blob retention as reported by kopia repository status --json → blobRetention.
Mirrors kopia’s format.BlobStorageConfiguration. Unlike the sibling EpochParameters,
the keys here are camelCase (kopia gives that struct explicit JSON tags), and unlike
it this type cannot be Copy — it carries a String.
retentionPeriod is a Go time.Duration, so the unit is nanoseconds (the same
convention as MaintenanceCadence::interval), not seconds.
Fields§
§mode: StringGOVERNANCE, COMPLIANCE, or empty when retention is off.
period_ns: i64Retention period in nanoseconds; 0 when retention is off.
Implementations§
Source§impl BlobRetention
impl BlobRetention
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether retention is actually in force. Mirrors kopia’s own IsRetentionEnabled():
a non-empty mode AND a non-zero period — kopia treats a half-set config as off.
Trait Implementations§
Source§impl Clone for BlobRetention
impl Clone for BlobRetention
Source§fn clone(&self) -> BlobRetention
fn clone(&self) -> BlobRetention
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 BlobRetention
impl Debug for BlobRetention
Source§impl Default for BlobRetention
impl Default for BlobRetention
Source§fn default() -> BlobRetention
fn default() -> BlobRetention
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlobRetention
impl<'de> Deserialize<'de> for BlobRetention
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BlobRetention
Source§impl PartialEq for BlobRetention
impl PartialEq for BlobRetention
Source§fn eq(&self, other: &BlobRetention) -> bool
fn eq(&self, other: &BlobRetention) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BlobRetention
impl Serialize for BlobRetention
impl StructuralPartialEq for BlobRetention
Auto Trait Implementations§
impl Freeze for BlobRetention
impl RefUnwindSafe for BlobRetention
impl Send for BlobRetention
impl Sync for BlobRetention
impl Unpin for BlobRetention
impl UnsafeUnpin for BlobRetention
impl UnwindSafe for BlobRetention
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