Skip to main content

ACMapScale

Trait ACMapScale 

Source
pub trait ACMapScale<S: PauliStorage, V: Coefficient, H: BuildHasher + Clone + Default, W: PauliWordTrait> {
    // Required method
    fn scale<F>(&mut self, f: F)
       where F: Fn(&W, &mut V) + Sync + Send;
}
Expand description

In-place per-entry transformation of values.

Required Methods§

Source

fn scale<F>(&mut self, f: F)
where F: Fn(&W, &mut V) + Sync + Send,

Apply f(key, value) to every entry; only the value is mutable.

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> ACMapScale<S, C, H, W> for DashMap<W, C, H>

Source§

fn scale<F>(&mut self, f: F)
where F: Fn(&W, &mut C) + Sync + Send,

Source§

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

Source§

fn scale<F>(&mut self, f: F)
where F: Fn(&W, &mut V) + Sync + Send,

Source§

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

Source§

fn scale<F>(&mut self, f: F)
where F: Fn(&W, &mut V) + Sync + Send,

Source§

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

Source§

fn scale<F>(&mut self, f: F)
where F: Fn(&W, &mut V) + Sync + Send,

Implementors§