Trait ToEntries

Source
pub trait ToEntries<K: 'static, V: 'static> {
    // Required method
    fn to_entries(&self) -> impl Iterator<Item = (&K, &V)>;
}
Expand description

Collection that can iterate over its entries.

Implemented for maps in the standard library, Vec<(K, V)>, Box<[(K, V)]> etc.

Required Methods§

Source

fn to_entries(&self) -> impl Iterator<Item = (&K, &V)>

Iterates over entries in the collection.

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§

Source§

impl<K: 'static, V: 'static, C> ToEntries<K, V> for C
where for<'a> &'a C: IntoIterator<Item: ToEntry<'a, K, V>>,