pub struct FeedDrain {
pub latest_changed_at: Option<Timestamp>,
pub server_heads: BTreeMap<Uuid, Option<Hash32>>,
}Expand description
A sync that drained the feed to its head: the evidence a retention sweep needs before it judges a deadline (Peering — Sync).
Fields§
§latest_changed_at: Option<Timestamp>The latest server changed_at the drain saw, or None for a drain that saw no entry.
server_heads: BTreeMap<Uuid, Option<Hash32>>Every asset the drained feed lists (the assets the server has indexed), with the hash of
the head record its latest entry carries, or None for an entry that carries none (a
purged asset, or an older server). A record’s hash is the SHA-256 of the entry’s
manifest_cbor, which is that record’s canonical CBOR.
It must cover the whole feed: a drain from the feed’s start, or heads the caller kept
across every cursored drain since one. A drain resumed from a cursor lists only what
changed after it, so an asset whose delete an earlier sync indexed would be missing,
judged held, and never expire.
Implementations§
Source§impl FeedDrain
impl FeedDrain
Sourcepub fn judged_at(&self) -> Option<Timestamp>
pub fn judged_at(&self) -> Option<Timestamp>
The instant a deadline is judged at: the latest server changed_at the drain saw, and
never this device’s clock. A device clock running ahead would purge early, and its
tombstone would then refuse a restore the server accepted in time; a late purge loses
nothing. None for a drain that saw no entry: there is no reading of the server’s clock
to judge by, so nothing is judged expired.
Trait Implementations§
impl Eq for FeedDrain
impl StructuralPartialEq for FeedDrain
Auto Trait Implementations§
impl Freeze for FeedDrain
impl RefUnwindSafe for FeedDrain
impl Send for FeedDrain
impl Sync for FeedDrain
impl Unpin for FeedDrain
impl UnsafeUnpin for FeedDrain
impl UnwindSafe for FeedDrain
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more