Skip to main content

ACMapRetain

Trait ACMapRetain 

Source
pub trait ACMapRetain<S, V, H, W>{
    // Required method
    fn retain<F>(&mut self, f: F)
       where F: FnMut(&W, &V) -> bool;
}
Expand description

Drop entries that don’t satisfy a predicate — used by truncation strategies.

Required Methods§

Source

fn retain<F>(&mut self, f: F)
where F: FnMut(&W, &V) -> bool,

Keep only entries for which f(key, value) returns true.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<S, C, H, W> ACMapRetain<S, C, H, W> for DashMap<W, C, H>

Source§

fn retain<F>(&mut self, f: F)
where F: FnMut(&W, &C) -> bool,

Source§

impl<S, V, H, W> ACMapRetain<S, V, H, W> for AHashMap<W, V, H>

Source§

fn retain<F>(&mut self, f: F)
where F: FnMut(&W, &V) -> bool,

Source§

impl<S, V, H, W> ACMapRetain<S, V, H, W> for HashMap<W, V, H>

Source§

fn retain<F>(&mut self, f: F)
where F: FnMut(&W, &V) -> bool,

Source§

impl<S, V, H, W> ACMapRetain<S, V, H, W> for IndexMap<W, V, H>

Source§

fn retain<F>(&mut self, f: F)
where F: FnMut(&W, &V) -> bool,

Implementors§