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§
fn generation_capacity(&self) -> usize
fn len(&self) -> usize
fn contains(&self, hash: &PacketHash) -> bool
fn remember(&mut self, hash: PacketHash) -> RememberPacketOutcome
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".