pub struct MessagesSummary {
pub message_ids: BTreeSet<MessageId>,
pub horizon: RetentionHorizon,
}Expand description
Summary of the messages a peer holds, plus the retention horizon a sender needs in order to avoid offering messages the peer would immediately prune.
BTreeSet (not HashSet, and not a Vec inheriting the state’s own
ordering) so the ciborium bytes are canonical for a given logical set:
freenet-core byte-compares summarize_state output for staleness, and a
non-canonical order makes two identical peers look perpetually out of sync.
See .claude/rules/contract-summary-determinism.md and
freenet/freenet-core#4857.
Fields§
§message_ids: BTreeSet<MessageId>§horizon: RetentionHorizonTrait Implementations§
Source§impl Clone for MessagesSummary
impl Clone for MessagesSummary
Source§fn clone(&self) -> MessagesSummary
fn clone(&self) -> MessagesSummary
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 MessagesSummary
impl Debug for MessagesSummary
Source§impl<'de> Deserialize<'de> for MessagesSummary
impl<'de> Deserialize<'de> for MessagesSummary
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 MessagesSummary
Source§impl PartialEq for MessagesSummary
impl PartialEq for MessagesSummary
Source§impl Serialize for MessagesSummary
impl Serialize for MessagesSummary
impl StructuralPartialEq for MessagesSummary
Auto Trait Implementations§
impl Freeze for MessagesSummary
impl RefUnwindSafe for MessagesSummary
impl Send for MessagesSummary
impl Sync for MessagesSummary
impl Unpin for MessagesSummary
impl UnsafeUnpin for MessagesSummary
impl UnwindSafe for MessagesSummary
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