Trait IterableMap

Source
pub trait IterableMap<K, V>: Iterable<Item = (K, V)> {
    type CCMap<X, Y>;

    // Provided methods
    fn map_value<U>(self, f: impl Fn(V) -> U) -> Self::CCMap<K, U>
       where Self: Sized,
             Self::CCMap<K, U>: Producer<(K, U)> { ... }
    fn map_kv<X, Y>(self, f: impl Fn((K, V)) -> (X, Y)) -> Self::CCMap<X, Y>
       where Self: Sized,
             Self::CCMap<X, Y>: Producer<(X, Y)> { ... }
}

Required Associated Types§

Source

type CCMap<X, Y>

Provided Methods§

Source

fn map_value<U>(self, f: impl Fn(V) -> U) -> Self::CCMap<K, U>
where Self: Sized, Self::CCMap<K, U>: Producer<(K, U)>,

Source

fn map_kv<X, Y>(self, f: impl Fn((K, V)) -> (X, Y)) -> Self::CCMap<X, Y>
where Self: Sized, Self::CCMap<X, Y>: Producer<(X, Y)>,

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<'a, K: 'a, V: 'a> IterableMap<&'a K, &'a V> for &'a BTreeMap<K, V>

Source§

type CCMap<X, Y> = BTreeMap<X, Y>

Source§

impl<'a, K: 'a, V: 'a> IterableMap<&'a K, &'a V> for &'a HashMap<K, V>

Source§

type CCMap<X, Y> = HashMap<X, Y>

Source§

impl<K, V> IterableMap<K, V> for BTreeMap<K, V>

Source§

type CCMap<X, Y> = BTreeMap<X, Y>

Source§

impl<K, V> IterableMap<K, V> for HashMap<K, V>

Source§

type CCMap<X, Y> = HashMap<X, Y>

Implementors§

Source§

impl<K, V, I, F> IterableMap<K, V> for LazyFilter<I, F>
where I: IterableMap<K, V>, F: Fn(&(K, V)) -> bool,

Source§

type CCMap<X, Y> = <I as IterableMap<K, V>>::CCMap<X, Y>

Source§

impl<K, V, I, F> IterableMap<K, V> for LazySkipWhile<I, F>
where I: IterableMap<K, V>, F: Fn(&(K, V)) -> bool,

Source§

type CCMap<X, Y> = <I as IterableMap<K, V>>::CCMap<X, Y>