Trait MapLike

Source
pub trait MapLike {
    type Key: Hash + Eq + Display + Clone;
    type Value: Debug;

    // Required methods
    fn contains_key(&self, key: &Self::Key) -> bool;
    fn is_empty(&self) -> bool;
}
Expand description

Represents a generic map-like container with key-value pairs.

Required Associated Types§

Required Methods§

Source

fn contains_key(&self, key: &Self::Key) -> bool

Source

fn is_empty(&self) -> bool

Implementations on Foreign Types§

Source§

impl<K, V, S> MapLike for HashMap<K, V, S>
where K: Eq + Hash + Display + Clone, V: Debug, S: BuildHasher,

Source§

type Key = K

Source§

type Value = V

Source§

fn contains_key(&self, k: &K) -> bool

Source§

fn is_empty(&self) -> bool

Source§

impl<K, V, S> MapLike for AHashMap<K, V, S>
where K: Eq + Hash + Display + Clone, V: Debug, S: BuildHasher,

Source§

type Key = K

Source§

type Value = V

Source§

fn contains_key(&self, k: &K) -> bool

Source§

fn is_empty(&self) -> bool

Source§

impl<K, V, S> MapLike for IndexMap<K, V, S>
where K: Eq + Hash + Display + Clone, V: Debug, S: BuildHasher,

Source§

type Key = K

Source§

type Value = V

Source§

fn contains_key(&self, k: &K) -> bool

Source§

fn is_empty(&self) -> bool

Implementors§