Skip to main content

ACMapContains

Trait ACMapContains 

Source
pub trait ACMapContains<S: PauliStorage, V: Coefficient, H: BuildHasher + Clone + Default, W: PauliWordTrait> {
    // Required method
    fn contains_with<F>(&self, key: &W, f: F) -> bool
       where F: Fn(&V) -> bool;

    // Provided method
    fn contains(&self, key: &W, value: &V) -> bool { ... }
}
Expand description

Membership queries — (key, value) exact match or with a custom predicate on the value.

Required Methods§

Source

fn contains_with<F>(&self, key: &W, f: F) -> bool
where F: Fn(&V) -> bool,

true if an entry for key exists whose value satisfies f.

Provided Methods§

Source

fn contains(&self, key: &W, value: &V) -> bool

true if an entry with this exact (key, value) is present.

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> ACMapContains<S, C, H, W> for AHashMap<W, C, H>

Source§

fn contains_with<F>(&self, key: &W, f: F) -> bool
where F: Fn(&C) -> bool,

Source§

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

Source§

fn contains_with<F>(&self, key: &W, f: F) -> bool
where F: Fn(&C) -> bool,

Source§

impl<S, C, H, W> ACMapContains<S, C, H, W> for HashMap<W, C, H>

Source§

fn contains_with<F>(&self, key: &W, f: F) -> bool
where F: Fn(&C) -> bool,

Source§

impl<S, C, H, W> ACMapContains<S, C, H, W> for IndexMap<W, C, H>

Source§

fn contains_with<F>(&self, key: &W, f: F) -> bool
where F: Fn(&C) -> bool,

Implementors§