pub trait MapProperties {
type Key;
type Value;
// Required methods
fn keys_property(&self) -> impl Iterator<Item = &Self::Key>;
fn values_property(&self) -> impl Iterator<Item = &Self::Value>;
fn entries_property(
&self,
) -> impl Iterator<Item = (&Self::Key, &Self::Value)>;
}Expand description
The properties of a map-like type.
Required Associated Types§
Required Methods§
Sourcefn keys_property(&self) -> impl Iterator<Item = &Self::Key>
fn keys_property(&self) -> impl Iterator<Item = &Self::Key>
Returns an iterator over the keys in this map.
Sourcefn values_property(&self) -> impl Iterator<Item = &Self::Value>
fn values_property(&self) -> impl Iterator<Item = &Self::Value>
Returns an iterator over the values in this map.
Sourcefn entries_property(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>
fn entries_property(&self) -> impl Iterator<Item = (&Self::Key, &Self::Value)>
Returns an iterator over the key/value-pairs in this map.
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.
Implementations on Foreign Types§
Source§impl<K, V> MapProperties for &BTreeMap<K, V>
impl<K, V> MapProperties for &BTreeMap<K, V>
Source§impl<K, V> MapProperties for &mut BTreeMap<K, V>
impl<K, V> MapProperties for &mut BTreeMap<K, V>
Source§impl<K, V> MapProperties for BTreeMap<K, V>
impl<K, V> MapProperties for BTreeMap<K, V>
Source§impl<K, V, H> MapProperties for &HashMap<K, V, H>
Available on crate feature std only.
impl<K, V, H> MapProperties for &HashMap<K, V, H>
Available on crate feature
std only.Source§impl<K, V, H> MapProperties for &HashMap<K, V, H>
impl<K, V, H> MapProperties for &HashMap<K, V, H>
Source§impl<K, V, H> MapProperties for &mut HashMap<K, V, H>
Available on crate feature std only.
impl<K, V, H> MapProperties for &mut HashMap<K, V, H>
Available on crate feature
std only.Source§impl<K, V, H> MapProperties for &mut HashMap<K, V, H>
impl<K, V, H> MapProperties for &mut HashMap<K, V, H>
Source§impl<K, V, H> MapProperties for HashMap<K, V, H>
Available on crate feature std only.
impl<K, V, H> MapProperties for HashMap<K, V, H>
Available on crate feature
std only.