Skip to main content

Dedup

Trait Dedup 

Source
pub trait Dedup {
    // Required methods
    fn observe(&mut self, key: PacketKey) -> DedupDecision;
    fn is_duplicate(&self, key: PacketKey) -> bool;
}
Expand description

Detects duplicate packet keys.

Required Methods§

Source

fn observe(&mut self, key: PacketKey) -> DedupDecision

Observes a packet key and returns whether it should be processed.

Source

fn is_duplicate(&self, key: PacketKey) -> bool

Returns whether a packet key is already known as observed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<const N: usize> Dedup for PacketDedup<N>