Trait Filter

Source
pub trait Filter {
    // Required methods
    fn lookup(&self, e: impl Hash) -> bool;
    fn insert(&mut self, e: impl Hash) -> bool;
}
Expand description

A Filter provides duplicate detection capabilities

Required Methods§

Source

fn lookup(&self, e: impl Hash) -> bool

Performs a lookup for the provided element

Source

fn insert(&mut self, e: impl Hash) -> bool

Performs a lookup for the provided element and inserts it

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§