Skip to main content

retention_closed

Function retention_closed 

Source
pub fn retention_closed(
    head_record: &[u8],
    at: Timestamp,
) -> Result<bool, HistoryError>
Expand description

Whether the retention window of the delete that is head_record (a feed entry’s manifest_cbor) had closed at at: at is at or after the retention_until signed into it, the instant from which the server refuses a trash-restore and stops serving the asset’s records and bytes to its readers.

A device that first sees an asset at an album page’s tombstone reads this before it fetches the asset’s history: a closed window means the fetch is refused, and there is nothing left to adopt or restore. A record that is not a delete, or a delete whose retention_until is absent or unreadable, has no closed window (false), as the trash judges one: a guessed deadline could only ever lose data.

§Errors

HistoryError::Malformed (hash is head) when head_record does not decode.