pub struct RetentionCandidate<'a> {
pub metadata: &'a FrameMetadata,
pub sequence: Option<u64>,
pub written_at_unix_ms: Option<u64>,
pub last_accessed_unix_ms: Option<u64>,
pub retention_label: Option<&'a str>,
}Expand description
A backend-provided candidate for retention evaluation.
The candidate borrows the stable FrameMetadata envelope and carries
optional facts supplied by the backend. Missing facts simply make rules that
depend on them non-matching.
Fields§
§metadata: &'a FrameMetadataStable frame metadata decoded from the backend entry.
sequence: Option<u64>Backend-specific monotonic sequence number, where larger is newer.
written_at_unix_ms: Option<u64>Backend-supplied write timestamp in Unix milliseconds.
last_accessed_unix_ms: Option<u64>Backend-supplied last-access timestamp in Unix milliseconds.
retention_label: Option<&'a str>Optional retention label stamped by the backend or host app.
Implementations§
Source§impl<'a> RetentionCandidate<'a>
impl<'a> RetentionCandidate<'a>
Sourcepub fn new(metadata: &'a FrameMetadata) -> Self
pub fn new(metadata: &'a FrameMetadata) -> Self
Construct a candidate from required frame metadata.
Sourcepub fn with_sequence(self, sequence: u64) -> Self
pub fn with_sequence(self, sequence: u64) -> Self
Attach a backend-specific monotonic sequence number.
Sourcepub fn with_written_at_unix_ms(self, written_at_unix_ms: u64) -> Self
pub fn with_written_at_unix_ms(self, written_at_unix_ms: u64) -> Self
Attach a backend-supplied write timestamp in Unix milliseconds.
Sourcepub fn with_last_accessed_unix_ms(self, last_accessed_unix_ms: u64) -> Self
pub fn with_last_accessed_unix_ms(self, last_accessed_unix_ms: u64) -> Self
Attach a backend-supplied last-access timestamp in Unix milliseconds.
Sourcepub fn with_retention_label(self, retention_label: &'a str) -> Self
pub fn with_retention_label(self, retention_label: &'a str) -> Self
Attach a host-defined retention label.
Trait Implementations§
Source§impl<'a> Clone for RetentionCandidate<'a>
impl<'a> Clone for RetentionCandidate<'a>
Source§fn clone(&self) -> RetentionCandidate<'a>
fn clone(&self) -> RetentionCandidate<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more