Dictionary

Trait Dictionary 

Source
pub trait Dictionary<K, V>: Map<K, V> + DynamicContainer
where K: Eq,
{ // Required method fn remove<Q>(&mut self, k: &Q) -> Option<V> where K: Borrow<Q>, Q: Eq + ?Sized; // Provided method fn contains<Q>(&self, key: &Q) -> bool where K: Borrow<Q>, Q: Eq + ?Sized { ... } }
Expand description

Key-value map that can dynamically change size.

Required Methods§

Source

fn remove<Q>(&mut self, k: &Q) -> Option<V>
where K: Borrow<Q>, Q: Eq + ?Sized,

Removes an item from this container using the associated key, and returns it (if it existed).

Provided Methods§

Source

fn contains<Q>(&self, key: &Q) -> bool
where K: Borrow<Q>, Q: Eq + ?Sized,

Returns true if this container contains the key.

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§