pub trait MapContainer: Sync {
type Key;
type Value;
// Required methods
fn get(&self, index: usize) -> Option<(&Self::Key, &Self::Value)>;
fn len(&self) -> usize;
}Expand description
a random-access container containing pairs of keys and values.
Both a tuple of two Containers and a Container of tuples are considered MapContainers:
Examples are (Vec<Key>, &[Val]) and Box<[(Key, Val)]>.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".