Skip to main content

synced_retention_closed

Function synced_retention_closed 

Source
pub fn synced_retention_closed(
    manifest_cbor: Vec<u8>,
    changed_at: String,
) -> Result<bool, FfiError>
Expand description

Whether a tombstone’s retention window had closed at changed_at (RFC 3339, a feed entry’s own): manifest_cbor is a delete record and changed_at is at or after the retention_until signed into it.

A device that first sees an asset at an album page’s tombstone reads this before it calls FfiSession::fetch_provenance_history: once the window has closed the server refuses the asset’s records and bytes to its readers, so there is nothing left to adopt, and passing the entry loses nothing. A record that is not a delete, or a delete whose window is absent or unreadable, answers false.

Pure and offline.

§Errors

FfiError::InvalidArgument when changed_at is not an RFC 3339 instant; FfiError::Sync when manifest_cbor does not decode.