Skip to main content

PacketHashHistory

Trait PacketHashHistory 

Source
pub trait PacketHashHistory {
    // Required methods
    fn generation_capacity(&self) -> usize;
    fn len(&self) -> usize;
    fn contains(&self, hash: &PacketHash) -> bool;
    fn remember(&mut self, hash: PacketHash) -> RememberPacketOutcome;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

RNS 1.4.2 Transport.packet_hashlist semantics: two generations of seen packet hashes. Remembering into a full current generation rotates: the current set becomes the previous, the oldest generation is forgotten. contains answers across both.

Required Methods§

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl PacketHashHistory for HeapPacketHashHistory

Source§

impl<const CAP: usize, const BUCKETS: usize> PacketHashHistory for FixedIndexedPacketHashHistory<CAP, BUCKETS>

Source§

impl<const GENERATION_CAPACITY: usize> PacketHashHistory for FixedPacketHashHistory<GENERATION_CAPACITY>