pub trait MapIter<'a>: HasMapData + Iter<'a> {
type KeyRef: Ref<'a, Self::Key>;
type ValueRef: Ref<'a, Self::Value>;
type IterKeysRef: Iterator<Item = Self::KeyRef>;
type IterValuesRef: Iterator<Item = Self::ValueRef>;
// Required methods
fn keys(&'a self) -> Self::IterKeysRef;
fn values(&'a self) -> Self::IterValuesRef;
}Expand description
A trait for map-like collections which can be iterated by references to keys and values.
Required Associated Types§
Sourcetype KeyRef: Ref<'a, Self::Key>
type KeyRef: Ref<'a, Self::Key>
Type of the references to the keys in the collection.
For more information, see the KeyRef trait.
Sourcetype ValueRef: Ref<'a, Self::Value>
type ValueRef: Ref<'a, Self::Value>
Type of the references to the values in the collection.
For more information, see the ValueRef trait.
Sourcetype IterKeysRef: Iterator<Item = Self::KeyRef>
type IterKeysRef: Iterator<Item = Self::KeyRef>
Type of the iterator over references to keys.
Sourcetype IterValuesRef: Iterator<Item = Self::ValueRef>
type IterValuesRef: Iterator<Item = Self::ValueRef>
Type of the iterator over references to values.
Required Methods§
Sourcefn keys(&'a self) -> Self::IterKeysRef
fn keys(&'a self) -> Self::IterKeysRef
Constructs an iterator over references to the keys in this collection.
Sourcefn values(&'a self) -> Self::IterValuesRef
fn values(&'a self) -> Self::IterValuesRef
Constructs an iterator over references to the values in this collection.